Public Member Functions | Protected Member Functions | List of all members
mirtk::ConnectedComponents< TVoxel > Class Template Reference

#include <ConnectedComponents.h>

Inheritance diagram for mirtk::ConnectedComponents< TVoxel >:
Inheritance graph
Collaboration diagram for mirtk::ConnectedComponents< TVoxel >:
Collaboration graph

Public Member Functions

int ComponentSize (VoxelType label) const
 
 ConnectedComponents (ConnectedComponentsOrdering=CC_LargestFirst, ConnectivityType=CONNECTIVITY_26)
 Constructor.
 
virtual void DeleteComponent (VoxelType)
 
virtual void Run ()
 Run erosion.
 
virtual ~ConnectedComponents ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ImageToImage< TVoxel >
 ImageToImage ()
 Constructor.
 
virtual bool RequiresBuffering () const
 
virtual double Run (int, int, int, int=0)
 Run filter on single voxel.
 
virtual ~ImageToImage ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

virtual void Finalize ()
 Finalize the filter execution.
 
virtual void Initialize ()
 Initialize the filter execution.
 
 mirtkAttributeMacro (NeighborhoodOffsets, Offsets)
 List of voxel offsets of the neighborhood.
 
 mirtkPublicAttributeMacro (ConnectedComponentsOrdering, Ordering)
 Ordering of output components.
 
 mirtkPublicAttributeMacro (ConnectivityType, Connectivity)
 What connectivity to assume when running the filter.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfComponents)
 Number of connected components.
 
 mirtkReadOnlyAttributeMacro (Array< int >, ComponentSize)
 Sizes of connected components.
 
- Protected Member Functions inherited from mirtk::ImageToImage< TVoxel >
void Initialize (bool)
 
 mirtkAggregateMacro (ImageType, Buffer)
 Buffer.
 
 mirtkPublicAggregateMacro (const ImageType, Input)
 Input image for filter.
 
 mirtkPublicAggregateMacro (ImageType, Output)
 Output image for filter.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Public Types inherited from mirtk::ImageToImage< TVoxel >
typedef GenericImage< VoxelTypeImageType
 Input/output image type.
 
typedef TVoxel VoxelType
 Input/output image voxel type.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

template<class TVoxel = GreyPixel>
class mirtk::ConnectedComponents< TVoxel >

Label the connected components of a segmentation.

The components are sorted by decreasing size, i.e., the first component is the largest connected component.

Definition at line 49 of file ConnectedComponents.h.

Member Function Documentation

§ ComponentSize()

template<class TVoxel >
int mirtk::ConnectedComponents< TVoxel >::ComponentSize ( VoxelType  label) const
inline

Size of the specified component

Parameters
[in]labelComponent label (1-based).

Definition at line 151 of file ConnectedComponents.h.

§ DeleteComponent()

template<class TVoxel = GreyPixel>
virtual void mirtk::ConnectedComponents< TVoxel >::DeleteComponent ( VoxelType  )
virtual

Remove specified component from the output image

This method must be called after Run(). Another execution of Run() will add the component again to the output.


The documentation for this class was generated from the following file: