18 #ifndef itkConnectedComponentImageFilter_h
19 #define itkConnectedComponentImageFilter_h
58 template<
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TInputImage >
84 TOutputImage::ImageDimension);
86 TOutputImage::ImageDimension);
88 TInputImage::ImageDimension);
97 typedef typename TInputImage::SizeType
SizeType;
132 itkSetMacro(FullyConnected,
bool);
133 itkGetConstReferenceMacro(FullyConnected,
bool);
134 itkBooleanMacro(FullyConnected);
141 itkGetConstReferenceMacro(ObjectCount,
LabelType);
151 this->
SetNthInput( 1, const_cast< TMaskImage * >( mask ) );
203 void operator=(const
Self &) ITK_DELETE_FUNCTION;
217 typename TInputImage::IndexType
where;
226 typedef std::vector< typename TInputImage::OffsetValueType >
OffsetVec;
273 #if !defined( ITK_WRAPPING_PARSER )
279 #ifndef ITK_MANUAL_INSTANTIATION
280 #if !defined( ITK_WRAPPING_PARSER )
281 #include "itkConnectedComponentImageFilter.hxx"
std::vector< runLength > lineEncoding
typedef(Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) >) SameDimension
TOutputImage OutputImageType
void LinkLabels(const LabelType lab1, const LabelType lab2)
void InsertSet(const LabelType label)
signed long OffsetValueType
std::vector< typename TInputImage::OffsetValueType > OffsetVec
TInputImage::ConstPointer m_Input
InputImageType::Pointer InputImagePointer
ImageToImageFilter< TInputImage, TOutputImage > Superclass
TInputImage InputImageType
MaskImageType::Pointer MaskImagePointer
TInputImage::PixelType InputPixelType
static const unsigned int ImageDimension
UnionFindType m_UnionFind
TInputImage::OffsetType OffsetType
TMaskImage::PixelType MaskPixelType
void SetMaskImage(TMaskImage *mask)
TOutputImage::RegionType::SizeType OutSizeType
TInputImage::InternalPixelType InputInternalPixelType
Base class for all process objects that output image data.
std::list< IndexType > ListType
TInputImage::OffsetValueType length
Superclass::InputImagePointer InputImagePointer
unsigned long SizeValueType
TOutputImage::PixelType OutputImagePixelType
std::vector< lineEncoding > LineMapType
std::vector< LabelType > UnionFindType
void FillOutput(const LineMapType &LineMap, ProgressReporter &progress)
TOutputImage::OffsetType OutputOffsetType
SizeValueType IdentifierType
SmartPointer< Self > Pointer
void EnlargeOutputRequestedRegion(DataObject *) override
TOutputImage::IndexType OutputIndexType
static const unsigned int InputImageDimension
SmartPointer< const Self > ConstPointer
TOutputImage::InternalPixelType OutputInternalPixelType
bool CheckNeighbors(const OutputIndexType &A, const OutputIndexType &B)
void InitUnion(SizeValueType size)
TOutputImage::SizeType OutputSizeType
const TMaskImage * GetMaskImage() const
TInputImage::IndexType where
OutputImageType::PixelType OutputImagePixelType
void SetupLineOffsets(OffsetVec &LineOffsets)
SizeValueType LookupSet(const LabelType label)
unsigned int ThreadIdType
Implements progress tracking for a filter.
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
ConnectedComponentImageFilter()
OutputImagePixelType m_BackgroundValue
void AfterThreadedGenerateData() override
void GenerateInputRequestedRegion() override
TInputImage::SizeType SizeType
void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType threadId) override
virtual ~ConnectedComponentImageFilter()
Base class for filters that take an image as input and produce an image as output.
SizeValueType CreateConsecutive()
TInputImage::IndexType IndexType
Barrier::Pointer m_Barrier
Control indentation during Print() invocation.
void BeforeThreadedGenerateData() override
std::vector< IdentifierType > m_NumberOfLabels
UnionFindType m_Consecutive
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
#define itkConceptMacro(name, concept)
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for all data objects in ITK.
ConnectedComponentImageFilter Self
static const unsigned int OutputImageDimension
TOutputImage::RegionType RegionType
TOutputImage::PixelType OutputPixelType
std::vector< IdentifierType > m_FirstLineIdToJoin
void CompareLines(lineEncoding ¤t, const lineEncoding &Neighbour)
Label the objects in a binary image.