18 #ifndef __itkConnectedComponentImageFilter_h
19 #define __itkConnectedComponentImageFilter_h
54 template<
class TInputImage,
class TOutputImage,
class TMaskImage = TInputImage >
79 itkStaticConstMacro(ImageDimension,
unsigned int,
80 TOutputImage::ImageDimension);
81 itkStaticConstMacro(OutputImageDimension,
unsigned int,
82 TOutputImage::ImageDimension);
83 itkStaticConstMacro(InputImageDimension,
unsigned int,
84 TInputImage::ImageDimension);
93 typedef typename TInputImage::SizeType
SizeType;
128 itkSetMacro(FullyConnected,
bool);
129 itkGetConstReferenceMacro(FullyConnected,
bool);
130 itkBooleanMacro(FullyConnected);
137 itkGetConstReferenceMacro(ObjectCount,
LabelType);
142 itkGetStaticConstMacro(OutputImageDimension) > ) );
145 void SetMaskImage(TMaskImage *mask)
147 this->SetNthInput( 1, const_cast< TMaskImage * >( mask ) );
150 const TMaskImage * GetMaskImage()
const
157 itkSetMacro(BackgroundValue, OutputImagePixelType);
158 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
164 m_FullyConnected =
false;
170 void PrintSelf(std::ostream & os,
Indent indent)
const;
175 void BeforeThreadedGenerateData();
177 void AfterThreadedGenerateData();
179 void ThreadedGenerateData(
const RegionType & outputRegionForThread,
ThreadIdType threadId);
184 void GenerateInputRequestedRegion();
190 void EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output) );
196 void operator=(
const Self &);
210 typename TInputImage::IndexType
where;
219 typedef std::vector< typename TInputImage::OffsetValueType >
OffsetVec;
232 void InsertSet(
const LabelType label);
236 void LinkLabels(
const LabelType lab1,
const LabelType lab2);
241 bool CheckNeighbors(
const OutputIndexType & A,
242 const OutputIndexType & B);
244 void CompareLines(lineEncoding & current,
const lineEncoding & Neighbour);
246 void FillOutput(
const LineMapType & LineMap,
249 void SetupLineOffsets(OffsetVec & LineOffsets);
254 if ( m_NumberOfLabels.size() > 1 )
266 #if !defined( CABLE_CONFIGURATION )
272 #ifndef ITK_MANUAL_INSTANTIATION
273 #if !defined( CABLE_CONFIGURATION )
274 #include "itkConnectedComponentImageFilter.hxx"