ITK  4.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::KLMSegmentationRegion Class Reference

Base class for KLMSegmentationRegion object. More...

#include <itkKLMSegmentationRegion.h>

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

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef vnl_vector< double > MeanRegionIntensityType
typedef SmartPointer< SelfPointer
typedef
RegionBorderVectorType::const_iterator 
RegionBorderVectorConstIterator
typedef
RegionBorderVectorType::iterator 
RegionBorderVectorIterator
typedef
RegionBorderVectorType::size_type 
RegionBorderVectorSizeType
typedef std::vector
< KLMSegmentationBorder * > 
RegionBorderVectorType
typedef Superclass::RegionLabelType RegionLabelType
typedef KLMSegmentationRegion Self
typedef SegmentationRegion Superclass

Public Member Functions

void CombineRegionParameters (const Self *region)
virtual ::itk::LightObject::Pointer CreateAnother (void) const
void DeleteAllRegionBorders ()
void DeleteRegionBorder (KLMSegmentationBorder *pBorderCandidate)
double EnergyFunctional (const Self *region)
virtual const
MeanRegionIntensityType
GetMeanRegionIntensity ()
virtual const char * GetNameOfClass () const
RegionBorderVectorConstIterator GetRegionBorderConstItBegin ()
RegionBorderVectorConstIterator GetRegionBorderConstItEnd ()
RegionBorderVectorIterator GetRegionBorderItBegin ()
RegionBorderVectorIterator GetRegionBorderItEnd ()
RegionBorderVectorSizeType GetRegionBorderSize () const
void InsertRegionBorder (RegionBorderVectorIterator it, KLMSegmentationBorder *pBorderCandidate)
void InsertRegionBorder (KLMSegmentationBorder *pBorderCandidate)
void PrintRegionInfo ()
void PushBackRegionBorder (KLMSegmentationBorder *pBorderCandidate)
void PushFrontRegionBorder (KLMSegmentationBorder *pBorderCandidate)
void ResetRegionLabelAndUpdateBorders (Self *region)
virtual void SetMeanRegionIntensity (MeanRegionIntensityType _arg)
void SetRegionParameters (MeanRegionIntensityType meanRegionIntensity, double regionArea, RegionLabelType label)
void UpdateRegionBorderLambda ()
void SpliceRegionBorders (Self *region)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

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

Private Member Functions

 KLMSegmentationRegion (const Self &)
void operator= (const Self &)

Private Attributes

MeanRegionIntensityType m_MeanRegionIntensity
RegionBorderVectorType m_RegionBorderVector

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 89 of file itkKLMSegmentationRegion.h.


Member Typedef Documentation

Reimplemented from itk::SegmentationRegion.

Definition at line 96 of file itkKLMSegmentationRegion.h.

Type definition for an double vector.

Definition at line 102 of file itkKLMSegmentationRegion.h.

Reimplemented from itk::SegmentationRegion.

Definition at line 95 of file itkKLMSegmentationRegion.h.

typedef RegionBorderVectorType::const_iterator itk::KLMSegmentationRegion::RegionBorderVectorConstIterator

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

Definition at line 117 of file itkKLMSegmentationRegion.h.

typedef RegionBorderVectorType::iterator itk::KLMSegmentationRegion::RegionBorderVectorIterator

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

Definition at line 113 of file itkKLMSegmentationRegion.h.

typedef RegionBorderVectorType::size_type itk::KLMSegmentationRegion::RegionBorderVectorSizeType

Definition at line 110 of file itkKLMSegmentationRegion.h.

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

Definition at line 109 of file itkKLMSegmentationRegion.h.

type definition for the region label type.

Reimplemented from itk::SegmentationRegion.

Definition at line 120 of file itkKLMSegmentationRegion.h.

Standard class typedefs.

Reimplemented from itk::SegmentationRegion.

Definition at line 93 of file itkKLMSegmentationRegion.h.

Reimplemented from itk::SegmentationRegion.

Definition at line 94 of file itkKLMSegmentationRegion.h.


Constructor & Destructor Documentation

itk::KLMSegmentationRegion::KLMSegmentationRegion ( ) [protected]
itk::KLMSegmentationRegion::~KLMSegmentationRegion ( ) [protected]
itk::KLMSegmentationRegion::KLMSegmentationRegion ( const Self ) [private]

Member Function Documentation

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.

virtual::itk::LightObject::Pointer itk::KLMSegmentationRegion::CreateAnother ( void  ) const [virtual]

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::SegmentationRegion.

void itk::KLMSegmentationRegion::DeleteAllRegionBorders ( )

Delete all region borders in the border list.

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

Delete a region border from the border list.

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.

virtual const MeanRegionIntensityType& itk::KLMSegmentationRegion::GetMeanRegionIntensity ( ) [virtual]
virtual const char* itk::KLMSegmentationRegion::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::SegmentationRegion.

RegionBorderVectorConstIterator itk::KLMSegmentationRegion::GetRegionBorderConstItBegin ( )
RegionBorderVectorConstIterator itk::KLMSegmentationRegion::GetRegionBorderConstItEnd ( )
RegionBorderVectorIterator itk::KLMSegmentationRegion::GetRegionBorderItBegin ( )

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

RegionBorderVectorIterator itk::KLMSegmentationRegion::GetRegionBorderItEnd ( )

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

RegionBorderVectorSizeType itk::KLMSegmentationRegion::GetRegionBorderSize ( ) const

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

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

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

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).

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

Method for creation through the object factory.

Reimplemented from itk::SegmentationRegion.

void itk::KLMSegmentationRegion::operator= ( const Self ) [private]

Mutex lock to protect modification to the reference count

Reimplemented from itk::SegmentationRegion.

void itk::KLMSegmentationRegion::PrintRegionInfo ( )

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

void itk::KLMSegmentationRegion::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]

Set/Get the area of the region.

Reimplemented from itk::SegmentationRegion.

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

Insert a region border to the back of the list.

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

Insert a region border to the front of the list.

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.

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

Set/Get the mean pixel intensity in the region.

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

Set the region with parameter values defining the region.

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 NULL 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 NULL and its Lambda value set to -1.0.

void itk::KLMSegmentationRegion::UpdateRegionBorderLambda ( )

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


Member Data Documentation

Definition at line 226 of file itkKLMSegmentationRegion.h.

Definition at line 225 of file itkKLMSegmentationRegion.h.


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