The program does a forward pass line by line through the entire image. Each cell in the foreground is assigned the same label value as cells in its neighborhood. If there is no label among the cells in its neighborhood, a new label value is assigned to the cell. This means that this cell belongs to a different connected component. We set up an equivalence table for each label to indicate the equivalence of the labels stored in the table. After the forward pass goes through the entire image, we merge the different connected components corresponding to the equivalence labels in the table. We implement this strategy in function GenerateData().
There are two options in the program. 1. Take an nD binary image as input, and produce an nD gray image, where intensity indicates label assigned to a connected component. 2. Take an nD binary image and a set of seed points as input, and output an nD binary image containing the cells connected to the seeds. For option 2, users need to assign the member variable std::list<IndexType> m_Seeds before calling function GenerateData().
typedef TInputImage::InternalPixelType | InputInternalPixelType |
typedef TInputImage::PixelType | InputPixelType |
typedef TOutputImage::InternalPixelType | OutputInternalPixelType |
typedef TOutputImage::PixelType | OutputPixelType |
itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension) | |
itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension) | |
Typedefs | |
typedef SmartPointer< const Self > | ConstPointer |
typedef TInputImage::IndexType | IndexType |
typedef TInputImage | InputImageType |
typedef std::list< IndexType > | ListType |
typedef TOutputImage | OutputImageType |
typedef SmartPointer< Self > | Pointer |
typedef TOutputImage::RegionType | RegionType |
typedef HardConnectedComponentImageFilter | Self |
typedef TInputImage::SizeType | SizeType |
typedef ImageToImageFilter < TInputImage, TOutputImage > | Superclass |
Functions | |
virtual const char * | GetNameOfClass () const |
HardConnectedComponentImageFilter (const Self &) | |
HardConnectedComponentImageFilter () | |
static Pointer | New () |
void | SetObjectSeed (const IndexType &seed) |
virtual | ~HardConnectedComponentImageFilter () |
void | GenerateData () |
void | PrintSelf (std::ostream &os, Indent indent) const |
Variables | |
ListType | m_Seeds |
typedef SmartPointer<const Self> HardConnectedComponentImageFilter::ConstPointer |
Definition at line 89 of file itkHardConnectedComponentImageFilter.h.
typedef TInputImage::IndexType HardConnectedComponentImageFilter::IndexType |
Definition at line 80 of file itkHardConnectedComponentImageFilter.h.
typedef TInputImage HardConnectedComponentImageFilter::InputImageType |
Image typedef support
Definition at line 78 of file itkHardConnectedComponentImageFilter.h.
typedef TInputImage::InternalPixelType HardConnectedComponentImageFilter::InputInternalPixelType |
Definition at line 68 of file itkHardConnectedComponentImageFilter.h.
typedef TInputImage::PixelType HardConnectedComponentImageFilter::InputPixelType |
Definition at line 67 of file itkHardConnectedComponentImageFilter.h.
typedef std::list<IndexType> HardConnectedComponentImageFilter::ListType |
Definition at line 83 of file itkHardConnectedComponentImageFilter.h.
typedef TOutputImage HardConnectedComponentImageFilter::OutputImageType |
Definition at line 79 of file itkHardConnectedComponentImageFilter.h.
typedef TOutputImage::InternalPixelType HardConnectedComponentImageFilter::OutputInternalPixelType |
Definition at line 66 of file itkHardConnectedComponentImageFilter.h.
typedef TOutputImage::PixelType HardConnectedComponentImageFilter::OutputPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 65 of file itkHardConnectedComponentImageFilter.h.
typedef SmartPointer<Self> HardConnectedComponentImageFilter::Pointer |
Smart pointer typedef support
Definition at line 88 of file itkHardConnectedComponentImageFilter.h.
typedef TOutputImage::RegionType HardConnectedComponentImageFilter::RegionType |
Definition at line 82 of file itkHardConnectedComponentImageFilter.h.
typedef HardConnectedComponentImageFilter HardConnectedComponentImageFilter::Self |
Standard "Self" & Superclass typedef.
Definition at line 58 of file itkHardConnectedComponentImageFilter.h.
typedef TInputImage::SizeType HardConnectedComponentImageFilter::SizeType |
Definition at line 81 of file itkHardConnectedComponentImageFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > HardConnectedComponentImageFilter::Superclass |
Definition at line 59 of file itkHardConnectedComponentImageFilter.h.
void HardConnectedComponentImageFilter::GenerateData | ( | ) | [protected] |
Standard pipeline method.
Referenced by itk::CastImageFilter< TFeatureImageType, Superclass::ImageType >::GenerateData(), itk::AreaClosingImageFilter< TInputImage, TOutputImage, TAttribute >::GenerateData(), itk::AreaOpeningImageFilter< TInputImage, TOutputImage, TAttribute >::GenerateData(), itk::HistogramAlgorithmBase< TInputHistogram >::Update(), itk::Statistics::SampleAlgorithmBase< TInputHistogram >::Update(), itk::CoreAtomImageToUnaryCorrespondenceMatrixProcess< TSourceImage >::Update(), itk::SymmetricEigenSystem< TMatrixElement, VNumberOfRows >::Update(), itk::MedialNodePairCorrespondenceProcess< TSourceImage >::Update(), itk::MedialNodeTripletCorrespondenceProcess< TSourceImage >::Update(), itk::Statistics::KdTreeGenerator< TSample >::Update(), and itk::Statistics::ListSampleToHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer, TMeasurementVectorLength >::Update().
virtual const char* HardConnectedComponentImageFilter::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods)
HardConnectedComponentImageFilter::HardConnectedComponentImageFilter | ( | const Self & | ) | [protected] |
Definition at line 126 of file itkHardConnectedComponentImageFilter.h.
HardConnectedComponentImageFilter::HardConnectedComponentImageFilter | ( | ) | [protected] |
Definition at line 124 of file itkHardConnectedComponentImageFilter.h.
HardConnectedComponentImageFilter::itkStaticConstMacro | ( | ImageDimension | , | |
unsigned | int, | |||
TOutputImage::ImageDimension | ||||
) |
HardConnectedComponentImageFilter::itkStaticConstMacro | ( | InputImageDimension | , | |
unsigned | int, | |||
TInputImage::ImageDimension | ||||
) |
static Pointer HardConnectedComponentImageFilter::New | ( | ) | [static] |
Method for creation through the object factory.
void HardConnectedComponentImageFilter::PrintSelf | ( | std::ostream & | os, | |
Indent | indent | |||
) | const [protected] |
Standard pipeline method.
Definition at line 132 of file itkHardConnectedComponentImageFilter.h.
Referenced by itk::Neighborhood< OutputPixelType::ValueType, itkGetStaticConstMacro(ImageDimension)>::Print(), itk::Statistics::DensityFunction< TMeasurementVector >::PrintSelf(), itk::NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >::PrintSelf(), itk::SobelEdgeDetectionImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::AreaClosingImageFilter< TInputImage, TOutputImage, TAttribute >::PrintSelf(), itk::Functor::ColormapFunctor< TScalar, TRGBPixel >::PrintSelf(), itk::GaussianKernelFunction::PrintSelf(), itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::PrintSelf(), itk::InterpolateImageFunction< TImageType, TCoordRep >::PrintSelf(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::PrintSelf(), itk::TensorRelativeAnisotropyImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::ThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >::PrintSelf(), itk::DivideByConstantImageFilter< TInputImage, TConstant, TOutputImage >::PrintSelf(), itk::LaplacianOperator< TPixel, VDimension, TAllocator >::PrintSelf(), itk::Statistics::LearningFunctionBase< LayerType::LayerInterfaceType, TTargetVector >::PrintSelf(), itk::Statistics::MersenneTwisterRandomVariateGenerator::PrintSelf(), itk::NearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::ValarrayImageContainer< TElementIdentifier, TElement >::PrintSelf(), itk::PDEDeformableRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::PrintSelf(), itk::AnnulusOperator< TPixel, TDimension, TAllocator >::PrintSelf(), itk::BSplineKernelFunction< VSplineOrder >::PrintSelf(), itk::VectorNearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::BSplineDerivativeKernelFunction< VSplineOrder >::PrintSelf(), itk::FastApproximateRankImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension >::PrintSelf(), itk::VectorAnisotropicDiffusionFunction< TImage >::PrintSelf(), itk::VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >::PrintSelf(), itk::BinaryProjectionImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::BinaryThresholdProjectionImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension)>::PrintSelf(), itk::Statistics::MembershipFunctionBase< TMeasurementVector >::PrintSelf(), itk::MultiplyByConstantImageFilter< TInputImage, TConstant, TOutputImage >::PrintSelf(), itk::QuadEdgeMeshDecimationFilter< TInput, TOutput, TCriterion >::PrintSelf(), itk::VectorInterpolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::PrintSelf(), itk::Statistics::ProbabilityDistribution::PrintSelf(), itk::SpatialObjectTreeNode< TDimension >::PrintSelf(), itk::GaussianOperator< TPixel, VDimension, TAllocator >::PrintSelf(), itk::GeodesicActiveContourShapePriorLevelSetFunction< TImageType, TFeatureImageType >::PrintSelf(), itk::Statistics::ListSampleBase< TPointSet::PointType >::PrintSelf(), itk::NearestNeighborExtrapolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::SubtractConstantFromImageFilter< TInputImage, TConstant, TOutputImage >::PrintSelf(), itk::SymmetricEigenAnalysisImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::TensorFractionalAnisotropyImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::ActiveShapeModelCalculator< TImage >::PrintSelf(), itk::AreaOpeningImageFilter< TInputImage, TOutputImage, TAttribute >::PrintSelf(), itk::ExtrapolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::Statistics::InputFunctionBase< TMeasurementVector, ScalarType >::PrintSelf(), itk::NormalizedCorrelationImageFilter< TInputImage, TMaskImage, TOutputImage, TOperatorValueType >::PrintSelf(), itk::Statistics::RadialBasisFunctionBase< ScalarType >::PrintSelf(), itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >::PrintSelf(), itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >::PrintSelf(), itk::Statistics::NNetDistanceMetricBase< TMeasurementVector >::PrintSelf(), itk::AddConstantToImageFilter< TInputImage, TConstant, TOutputImage >::PrintSelf(), itk::AnisotropicDiffusionFunction< TImage >::PrintSelf(), itk::Statistics::Sample< TPointSet::PointType >::PrintSelf(), itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >::PrintSelf(), itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::PrintSelf(), itk::GeodesicActiveContourLevelSetFunction< TImageType, TFeatureImageType >::PrintSelf(), itk::Statistics::TransferFunctionBase< ScalarType >::PrintSelf(), itk::KernelFunction::PrintSelf(), and itk::VectorNeighborhoodOperatorImageFilter< TInputImage, TOutputImage >::PrintSelf().
void HardConnectedComponentImageFilter::SetObjectSeed | ( | const IndexType & | seed | ) |
Setting the seed points for specified object.
Definition at line 102 of file itkHardConnectedComponentImageFilter.h.
References m_Seeds.
virtual HardConnectedComponentImageFilter::~HardConnectedComponentImageFilter | ( | ) | [protected, virtual] |
Definition at line 125 of file itkHardConnectedComponentImageFilter.h.