ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members

#include <itkKLMSegmentationRegion.h>

Detailed Description

Base class for KLMSegmentationRegion object.

itkKLMSegmentationRegion is the base class for the KLMSegmentationRegion objects. It provides the basic function definitions that are inherent to KLMSegmentationRegion objects.

This object supports data handling of multiband images. The object accepts images in vector format, where each pixel is a vector and each element of the vector corresponds to an entry from 1 particular band of a multiband dataset.

We expect the user to provide the input to the routine in vector format. A single band image is treated as a vector image with a single element for every vector.

Data structure for a region: A region is defined as a closed area in the image that is surrounded by a list of borders objects (see itkKLMSegmentationBorder class).

Shown below is an initial two-dimensional 8x9 image with a 4x3 grid size partition. The initial region blocks are labelled in hexadecimal. Below the grid partition, the borders are shown as E, where C is an image pixel from the initial image. Note that each border is placed in between two regions. Each two-dimensional region is surrounded by four borders.

Initial regions of a 8 by 9 image with a 4 by 3 grid partition.

\[\begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline 1 & 1 & 1 & 2 & 2 & 2 & 3 & 3 & 3 \\ \hline 1 & 1 & 1 & 2 & 2 & 2 & 3 & 3 & 3 \\ \hline 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 & 6 \\ \hline 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 & 6 \\ \hline 7 & 7 & 7 & 8 & 8 & 8 & 9 & 9 & 9 \\ \hline 7 & 7 & 7 & 8 & 8 & 8 & 9 & 9 & 9 \\ \hline a & a & a & b & b & b & c & c & c \\ \hline a & a & a & b & b & b & c & c & c \\ \hline \end{tabular}\]

Region borders are shown as "E".

\[\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline C & C & C & & C & C & C & & C & C & C \\ \hline C & C & C & E & C & C & C & E & C & C & C \\ \hline & E & & & & E & & & & E & \\ \hline C & C & C & & C & C & C & & C & C & C \\ \hline C & C & C & E & C & C & C & E & C & C & C \\ \hline & E & & & & E & & & & E & \\ \hline C & C & C & & C & C & C & & C & C & C \\ \hline C & C & C & E & C & C & C & E & C & C & C \\ \hline & E & & & & E & & & & E & \\ \hline C & C & C & & C & C & C & & C & C & C \\ \hline C & C & C & E & C & C & C & E & C & C & C \\ \hline \end{tabular}\]

Definition at line 93 of file itkKLMSegmentationRegion.h.

+ Inheritance diagram for itk::KLMSegmentationRegion:
+ Collaboration diagram for itk::KLMSegmentationRegion:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MeanRegionIntensityType = vnl_vector< double >
 
using Pointer = SmartPointer< Self >
 
using RegionBorderVectorConstIterator = RegionBorderVectorType::const_iterator
 
using RegionBorderVectorIterator = RegionBorderVectorType::iterator
 
using RegionBorderVectorSizeType = RegionBorderVectorType::size_type
 
using RegionBorderVectorType = std::vector< KLMSegmentationBorder * >
 
using RegionLabelType = Superclass::RegionLabelType
 
using Self = KLMSegmentationRegion
 
using Superclass = SegmentationRegion
 
- Public Types inherited from itk::SegmentationRegion
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using RegionLabelType = unsigned int
 
using Self = SegmentationRegion
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

void CombineRegionParameters (const Self *region)
 
void DeleteAllRegionBorders ()
 
void DeleteRegionBorder (KLMSegmentationBorder *pBorderCandidate)
 
double EnergyFunctional (const Self *region)
 
const char * GetNameOfClass () const override
 
RegionBorderVectorConstIterator GetRegionBorderConstItBegin ()
 
RegionBorderVectorConstIterator GetRegionBorderConstItEnd ()
 
RegionBorderVectorIterator GetRegionBorderItBegin ()
 
RegionBorderVectorIterator GetRegionBorderItEnd ()
 
RegionBorderVectorSizeType GetRegionBorderSize () const
 
void InsertRegionBorder (KLMSegmentationBorder *pBorderCandidate)
 
void InsertRegionBorder (RegionBorderVectorIterator RegionBorderVectorIt, KLMSegmentationBorder *pBorderCandidate)
 
void PrintRegionInfo ()
 
void PushBackRegionBorder (KLMSegmentationBorder *pBorderCandidate)
 
void PushFrontRegionBorder (KLMSegmentationBorder *pBorderCandidate)
 
void ResetRegionLabelAndUpdateBorders (Self *region)
 
void SetRegionParameters (MeanRegionIntensityType meanRegionIntensity, double regionArea, RegionLabelType label)
 
void UpdateRegionBorderLambda ()
 
virtual void SetMeanRegionIntensity (MeanRegionIntensityType _arg)
 
virtual const MeanRegionIntensityTypeGetMeanRegionIntensity () const
 
void SpliceRegionBorders (Self *region)
 
- Public Member Functions inherited from itk::SegmentationRegion
virtual void ApplySegmentationRegion ()
 
const char * GetNameOfClass () const override
 
virtual void SetRegionLabel (RegionLabelType _arg)
 
virtual const RegionLabelTypeGetRegionLabel () const
 
virtual void SetRegionArea (double _arg)
 
virtual const double & GetRegionArea () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::SegmentationRegion
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 KLMSegmentationRegion ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~KLMSegmentationRegion () override
 
- Protected Member Functions inherited from itk::SegmentationRegion
void PrintSelf (std::ostream &os, Indent indent) const override
 
 SegmentationRegion ()
 
 ~SegmentationRegion () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

MeanRegionIntensityType m_MeanRegionIntensity {}
 
RegionBorderVectorType m_RegionBorderVector {}
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

Definition at line 102 of file itkKLMSegmentationRegion.h.

◆ MeanRegionIntensityType

Type definition for an double vector.

Definition at line 111 of file itkKLMSegmentationRegion.h.

◆ Pointer

Definition at line 101 of file itkKLMSegmentationRegion.h.

◆ RegionBorderVectorConstIterator

using itk::KLMSegmentationRegion::RegionBorderVectorConstIterator = RegionBorderVectorType::const_iterator

Type definition for the const region border vector iterators to be used.

Definition at line 123 of file itkKLMSegmentationRegion.h.

◆ RegionBorderVectorIterator

using itk::KLMSegmentationRegion::RegionBorderVectorIterator = RegionBorderVectorType::iterator

Type definition for the region border vector iterators to be used.

Definition at line 119 of file itkKLMSegmentationRegion.h.

◆ RegionBorderVectorSizeType

using itk::KLMSegmentationRegion::RegionBorderVectorSizeType = RegionBorderVectorType::size_type

Definition at line 116 of file itkKLMSegmentationRegion.h.

◆ RegionBorderVectorType

Type definition for vector container that stores the borders associated with a current region.

Definition at line 115 of file itkKLMSegmentationRegion.h.

◆ RegionLabelType

using itk::KLMSegmentationRegion::RegionLabelType = Superclass::RegionLabelType

type definition for the region label type.

Definition at line 126 of file itkKLMSegmentationRegion.h.

◆ Self

Standard class type aliases.

Definition at line 99 of file itkKLMSegmentationRegion.h.

◆ Superclass

Definition at line 100 of file itkKLMSegmentationRegion.h.

Constructor & Destructor Documentation

◆ KLMSegmentationRegion()

itk::KLMSegmentationRegion::KLMSegmentationRegion ( )
protected

◆ ~KLMSegmentationRegion()

itk::KLMSegmentationRegion::~KLMSegmentationRegion ( )
overrideprotected

Member Function Documentation

◆ CombineRegionParameters()

void itk::KLMSegmentationRegion::CombineRegionParameters ( const Self region)

Set the region with parameter values (mean and area) defining the region when merged with the new region.

◆ DeleteAllRegionBorders()

void itk::KLMSegmentationRegion::DeleteAllRegionBorders ( )

Delete all region borders in the border list.

◆ DeleteRegionBorder()

void itk::KLMSegmentationRegion::DeleteRegionBorder ( KLMSegmentationBorder pBorderCandidate)

Delete a region border from the border list.

◆ EnergyFunctional()

double itk::KLMSegmentationRegion::EnergyFunctional ( const Self region)

Compute the energy cost (mean squared difference scaled by area) that would result if this region is merged with another region.

◆ GetMeanRegionIntensity()

virtual const MeanRegionIntensityType & itk::KLMSegmentationRegion::GetMeanRegionIntensity ( ) const
virtual

Set/Get the mean pixel intensity in the region.

◆ GetNameOfClass()

const char * itk::KLMSegmentationRegion::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::Object.

◆ GetRegionBorderConstItBegin()

RegionBorderVectorConstIterator itk::KLMSegmentationRegion::GetRegionBorderConstItBegin ( )

◆ GetRegionBorderConstItEnd()

RegionBorderVectorConstIterator itk::KLMSegmentationRegion::GetRegionBorderConstItEnd ( )

◆ GetRegionBorderItBegin()

RegionBorderVectorIterator itk::KLMSegmentationRegion::GetRegionBorderItBegin ( )

Get a head pointer to the vector container storing the borders associated with a region.

◆ GetRegionBorderItEnd()

RegionBorderVectorIterator itk::KLMSegmentationRegion::GetRegionBorderItEnd ( )

Get a tail pointer to the vector container storing the borders associated with a region.

◆ GetRegionBorderSize()

RegionBorderVectorSizeType itk::KLMSegmentationRegion::GetRegionBorderSize ( ) const

Get the number of borders in the vector container storing the borders associated with a region.

◆ InsertRegionBorder() [1/2]

void itk::KLMSegmentationRegion::InsertRegionBorder ( KLMSegmentationBorder pBorderCandidate)

Insert a region border to the list, where position is unknown (sorting based on region labels is done to maintain consistency).

◆ InsertRegionBorder() [2/2]

void itk::KLMSegmentationRegion::InsertRegionBorder ( RegionBorderVectorIterator  RegionBorderVectorIt,
KLMSegmentationBorder pBorderCandidate 
)

Insert a region border into the border list at a given location.

◆ New()

static Pointer itk::KLMSegmentationRegion::New ( )
static

Method for creation through the object factory.

◆ PrintRegionInfo()

void itk::KLMSegmentationRegion::PrintRegionInfo ( )

Function to print the region parameters using std::cout.

◆ PrintSelf()

void itk::KLMSegmentationRegion::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ PushBackRegionBorder()

void itk::KLMSegmentationRegion::PushBackRegionBorder ( KLMSegmentationBorder pBorderCandidate)

Insert a region border to the back of the list.

◆ PushFrontRegionBorder()

void itk::KLMSegmentationRegion::PushFrontRegionBorder ( KLMSegmentationBorder pBorderCandidate)

Insert a region border to the front of the list.

◆ ResetRegionLabelAndUpdateBorders()

void itk::KLMSegmentationRegion::ResetRegionLabelAndUpdateBorders ( Self region)

Reset a region's label to that of the supplied region and update the regions borders to that of the supplied region.

◆ SetMeanRegionIntensity()

virtual void itk::KLMSegmentationRegion::SetMeanRegionIntensity ( MeanRegionIntensityType  _arg)
virtual

Set/Get the mean pixel intensity in the region.

◆ SetRegionParameters()

void itk::KLMSegmentationRegion::SetRegionParameters ( MeanRegionIntensityType  meanRegionIntensity,
double  regionArea,
RegionLabelType  label 
)

Set the region with parameter values defining the region.

◆ SpliceRegionBorders()

void itk::KLMSegmentationRegion::SpliceRegionBorders ( Self region)

Splice the regions borders from the new region into the current region. If duplicate borders are found, the duplicate border region is not inserted into the new region borders list, rather, it has its pointers to region1 and region2 set to nullptr and Lambda set to -1.0.

For example, take an image with 3 regions A, B, C

\[\begin{tabular}{|c|c|} \hline A & A \\ \hline B & C \\ \hline \end{tabular}\]

where region A has region borders A-B and A-C; region B has region borders A-B and B-C; and region C has region borders A-C and B-C.

Suppose region border A-B has been removed, so that region B can be merged into region A. When splicing the region borders from A and B into the new region A, duplicate region borders A-C and A-C (one of which was formerly B-C) will be present. In this case, one of the region borders A-C is given the combined length of the two former borders and is put into the region borders list. The other is nullified by having its pointers to region1 and region2 set to nullptr and its Lambda value set to -1.0.

◆ UpdateRegionBorderLambda()

void itk::KLMSegmentationRegion::UpdateRegionBorderLambda ( )

Recalculate the Lambda values using EvaluateLambda() for all the borders defining the region.

Member Data Documentation

◆ m_MeanRegionIntensity

MeanRegionIntensityType itk::KLMSegmentationRegion::m_MeanRegionIntensity {}
private

Definition at line 246 of file itkKLMSegmentationRegion.h.

◆ m_RegionBorderVector

RegionBorderVectorType itk::KLMSegmentationRegion::m_RegionBorderVector {}
private

Definition at line 245 of file itkKLMSegmentationRegion.h.


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