|
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
|
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
|
using | CompareLinesCallback = std::function< void(const LineEncodingConstIterator ¤tRun, const LineEncodingConstIterator &neighborRun, OffsetValueType oStart, OffsetValueType oLast)> |
|
using | ConsecutiveVectorType = std::vector< OutputPixelType > |
|
using | InternalLabelType = SizeValueType |
|
using | LineEncodingConstIterator = typename LineEncodingType::const_iterator |
|
using | LineEncodingIterator = typename LineEncodingType::iterator |
|
using | LineEncodingType = std::vector< RunLength > |
|
using | LineMapType = std::vector< LineEncodingType > |
|
using | OffsetVectorConstIterator = typename OffsetVectorType::const_iterator |
|
using | OffsetVectorType = std::vector< OffsetValueType > |
|
using | OutSizeType = typename TOutputImage::RegionType::SizeType |
|
using | UnionFindType = std::vector< InternalLabelType > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | EnclosingFilter = ImageToImageFilter< TInputImage, TOutputImage > |
|
using | IndexType = typename TInputImage::IndexType |
|
using | InputImageConstPointer = typename InputImageType::ConstPointer |
|
using | InputImagePointer = typename InputImageType::Pointer |
|
using | InputImageType = TInputImage |
|
using | InputPixelType = typename TInputImage::PixelType |
|
using | OffsetType = typename TInputImage::OffsetType |
|
using | OutputImagePixelType = typename TOutputImage::PixelType |
|
using | OutputImagePointer = typename OutputImageType::Pointer |
|
using | OutputImageType = TOutputImage |
|
using | OutputIndexType = typename TOutputImage::IndexType |
|
using | OutputOffsetType = typename TOutputImage::OffsetType |
|
using | OutputPixelType = typename TOutputImage::PixelType |
|
using | OutputRegionType = typename TOutputImage::RegionType |
|
using | OutputSizeType = typename TOutputImage::SizeType |
|
using | Pointer = SmartPointer< Self > |
|
using | RegionType = OutputRegionType |
|
using | Self = ScanlineFilterCommon |
|
using | SizeType = typename TInputImage::SizeType |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () override=default |
|
void | VerifyInputInformation () ITKv5_CONST override |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
void | PushBackInput (const DataObject *input) override |
|
void | PushFrontInput (const DataObject *input) override |
|
| ImageSource () |
|
| ~ImageSource () override=default |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) |
|
virtual void | AllocateOutputs () |
|
virtual void | BeforeThreadedGenerateData () |
|
virtual void | AfterThreadedGenerateData () |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | DynamicMultiThreadingOff () |
|
| ProcessObject () |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
void | SetRequiredInputNames (const NameArray &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
virtual void | AddOutput (DataObject *output) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
virtual void | VerifyPreconditions () ITKv5_CONST |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual void | GenerateOutputInformation () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | ReleaseInputs () |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | ThreaderUpdateProgressOff () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
| ~Object () override |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|
bool | CheckNeighbors (const OutputIndexType &A, const OutputIndexType &B) const |
|
void | CompareLines (const LineEncodingType ¤t, const LineEncodingType &Neighbour, bool sameLineOffset, bool labelCompare, OutputPixelType background, CompareLinesCallback callback) |
|
void | ComputeEquivalence (const SizeValueType workUnitResultsIndex, bool strictlyLess) |
|
SizeValueType | CreateConsecutive (OutputPixelType backgroundValue) |
|
WorkUnitData | CreateWorkUnitData (const RegionType &outputRegionForThread) |
|
SizeValueType | IndexToLinearIndex (const IndexType &index) const |
|
void | InitUnion (InternalLabelType numberOfLabels) |
|
void | LinkLabels (const InternalLabelType label1, const InternalLabelType label2) |
|
InternalLabelType | LookupSet (const InternalLabelType label) |
|
void | SetupLineOffsets (bool wholeNeighborhood) |
|
void | Register () const |
|
| ScanlineFilterCommon (EnclosingFilter *enclosingFilter) |
|
void | UnRegister () const noexcept |
|
| ~ScanlineFilterCommon ()=default |
|
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
|
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
|
static constexpr float | progressFixedToFloat (uint32_t fixed) |
|
static uint32_t | progressFloatToFixed (float f) |
|
static Pointer | New () |
|
bool | m_DynamicMultiThreading |
|
bool | m_Updating |
|
TimeStamp | m_OutputInformationMTime |
|
std::atomic< int > | m_ReferenceCount |
|
ConsecutiveVectorType | m_Consecutive |
|
WeakPointer< EnclosingFilter > | m_EnclosingFilter |
|
bool | m_FullyConnected |
|
LineMapType | m_LineMap |
|
OffsetVectorType | m_LineOffsets |
|
std::mutex | m_Mutex |
|
std::atomic< SizeValueType > | m_NumberOfLabels |
|
UnionFindType | m_UnionFind |
|
std::deque< WorkUnitData > | m_WorkUnitResults |
|
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
|
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
|
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
|
template<typename TInputImage, typename TOutputImage, typename TMaskImage = TInputImage>
class itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >
Label the objects in a binary image.
ConnectedComponentImageFilter labels the objects in a binary image (non-zero pixels are considered to be objects, zero-valued pixels are considered to be background). Each distinct object is assigned a unique label. The filter experiments with some improvements to the existing implementation, and is based on run length encoding along raster lines. If the output background value is set to zero (the default), the final object labels start with 1 and are consecutive. If the output background is set to a non-zero value (by calling the SetBackgroundValue() routine of the filter), the final labels start at 0, and remain consecutive except for skipping the background value as needed. Objects that are reached earlier by a raster order scan have a lower label. This is different to the behaviour of the original connected component image filter which did not produce consecutive labels or impose any particular ordering.
After the filter is executed, ObjectCount holds the number of connected components.
- See also
- ImageToImageFilter
- ITK Sphinx Examples:
-
- Examples
- Examples/Filtering/DanielssonDistanceMapImageFilter.cxx, SphinxExamples/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ConvertImageToLabelMap/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ShapeAttributesForBinaryImage/Code.cxx, SphinxExamples/src/Segmentation/ConnectedComponents/ExtraLargestConnectComponentFromBinaryImage/Code.cxx, and SphinxExamples/src/Segmentation/ConnectedComponents/LabelConnectComponentsInBinaryImage/Code.cxx.
Definition at line 59 of file itkConnectedComponentImageFilter.h.