/vol/vipdata/irtk/image++/include/irtkLargestConnectedComponent.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _IRTKLARGESTCONNECTEDCOMPONENT_H
00014
00015 #define _IRTKLARGESTCONNECTEDCOMPONENT_H
00016
00017 #include <irtkImageToImage.h>
00018
00027 template <class VoxelType> class irtkLargestConnectedComponent : public irtkImageToImage<VoxelType>
00028 {
00029
00031 int _currentClusterSize;
00032
00034 int _largestClusterSize;
00035
00037 VoxelType _ClusterLabel;
00038
00040 Bool _Mode2D;
00041
00042 protected:
00043
00045 void Grow2D(int, int, int, int);
00046
00048 void Grow3D(int, int, int, int);
00049
00051 virtual Bool RequiresBuffering();
00052
00054 virtual const char *NameOfClass();
00055
00056 public:
00057
00059 irtkLargestConnectedComponent(VoxelType = 0);
00060
00062 ~irtkLargestConnectedComponent();
00063
00065 SetMacro(ClusterLabel, VoxelType);
00066
00068 GetMacro(ClusterLabel, VoxelType);
00069
00071 SetMacro(Mode2D, Bool);
00072
00074 GetMacro(Mode2D, Bool);
00075
00077 virtual void Run();
00078
00079 };
00080
00081 #endif