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);
162 m_FullyConnected =
false;
169 void PrintSelf(std::ostream & os,
Indent indent)
const;
174 void BeforeThreadedGenerateData();
176 void AfterThreadedGenerateData();
178 void ThreadedGenerateData(
const RegionType & outputRegionForThread,
ThreadIdType threadId);
183 void GenerateInputRequestedRegion();
189 void EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output) );
194 void operator=(
const Self &);
208 typename TInputImage::IndexType
where;
217 typedef std::vector< typename TInputImage::OffsetValueType >
OffsetVec;
230 void InsertSet(
const LabelType label);
234 void LinkLabels(
const LabelType lab1,
const LabelType lab2);
239 bool CheckNeighbors(
const OutputIndexType & A,
240 const OutputIndexType & B);
242 void CompareLines(lineEncoding & current,
const lineEncoding & Neighbour);
244 void FillOutput(
const LineMapType & LineMap,
247 void SetupLineOffsets(OffsetVec & LineOffsets);
252 if ( m_NumberOfLabels.size() > 1 )
264 #if !defined( CABLE_CONFIGURATION )
270 #ifndef ITK_MANUAL_INSTANTIATION
271 #if !defined( CABLE_CONFIGURATION )
272 #include "itkConnectedComponentImageFilter.hxx"