ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Attributes | List of all members
itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage > Class Template Reference

#include <itkKLMRegionGrowImageFilter.h>

+ Inheritance diagram for itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >:

Detailed Description

template<typename TInputImage, typename TOutputImage>
class itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >

Base class for a region growing object that performs energy-based region growing for multiband images.

itkKLMRegionGrowImageFilter is the base class for the KLMRegionGrowImageFilter objects. This object performs energy-based region growing for multiband images. Since this is based on G. Koepfler,C. Lopez and J. M. Morel's work described below, the acronym KLM is added at the end of the object name.

The ApplyRegionGrowImageFilter() function implements the segmentation algorithm that partitions the input image into non-overlapping regions by minimizing an energy functional which trades off the similarity of regions against the length of their shared boundary. The heart of the process relies on the MergeRegion() method that calls a private function to perform the merging of region based on the piecewise constant KLM algorithm for region merging. For extensibility purposes, the MergeRegion() function is made virtual. Extensions can be made possible using function overloading or overriding the virtual function in a derived class. It starts by breaking the image into many small regions and fitting the regions to a polynomial model. The algorithm iteratively merges into one region the two adjoining regions which are most alike in terms of the specified polynomial model given the length of the border between the two regions. Internally, the energy functional is evaluated using a Lagrangian parameter called lambda which is also called the scale parameter as it controls the coarseness of the segmentation where a small value of lambda corresponds to a finer segmentation with more regions and a large value corresponds to a coarse segmentation with fewer regions. Since the algorithm grows regions by merging like regions, the internal value of lambda increases as the number of regions decreases.

The user can stop the merging of regions using the SetMaximumNumberOfRegions() and SetMaximumLambda() functions. The SetMaximumNumberOfRegions() function is publicly inherited from its base class and internally sets the m_MaximumNumberOfRegions parameter. The SetMaximumLambda() function sets the m_MaximumLambda parameter. If the number of regions in the image is equal to m_MaximumNumberOfRegions or if the internal energy functional becomes greater than m_MaximumLambda, then the merging iterations will stop. Note that a larger energy function value for m_MaximumLambda will result in fewer boundaries and fewer regions, while a smaller value for m_MaximumLambda will result in more boundaries and more regions. To have m_MaximumNumberOfRegions control exactly the number of output regions, m_MaximumLamda should be set to a very large number. To have m_MaximumLambda control exactly the number of output regions, m_MaximumNumberOfRegions should be set to 2. As a default value, m_MaximumLambda is set to 1000 and m_MaximumNumberOfRegions is set to 2.

Currently implementation puts equal weight to the multichannel values. In future improvements we plan to allow the user to control the weights associated with each individual channels.

It is templated over the type of input and output image. 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.

This algorithm implementation takes a multiband image stored in vector format as input and produces two outputs. Using the ImageToImageFilter, the piecewise constant approximation image is the output calculated using the process update mechanism. The second output, i.e., the image with the region labels (segmentation image) is returned at users request by calling GetLabelledImage() function. This function returns a reference to the labelled image determined using the KLM algorithm. The algorithm supports 2D and 3D data sets only. The input image dimensions must be exact multiples of the user specified gridsizes. Appropriate padding must be performed by the user if any image which are not multiples of the gridsizes are used.

For more information about the algorithm, see G. Koepfler, C. Lopez and J. M. Morel, ``A Multiscale Algorithm for Image Segmentation by Variational Method,'' {SIAM Journal of Numerical Analysis}, vol. 31, pp. 282-299, 1994.

Algorithm details:

This function segments a two-dimensional input image into non-overlapping atomic regions $ O_i, i=1,2,\ldots,N $, where $ N $ is the total number of region, by minimizing the following energy functional (also known as the simplified Mumford and Shah functional): $ E(u,K)=\int_{\Omega-K}||u(r,c)-g(r,c)||^2{d{\Omega}}+\lambda\cdot{L(K)} $, where $ \Omega $ denotes the domain of an image, $ g(r,c) $ is the input image, and $ u(r,c) $ is an approximation of $ g(r,c) $. Furthermore, $ u(r,c) $ is defined to be piecewise constant in regions $ O_i $. If $ \partial O_i $ represents the boundary of the region, $ K=\bigcup_{i=1}^N\partial{O_i} $ denotes the set of all region boundaries and $ L(K) $ is the total length of the boundaries. The parameter $ \lambda $ controls the coarseness of the segmentation (i.e. a larger $ \lambda $ will result in fewer boundaries).

Starting with small, piecewise-constant initial regions the algorithm iteratively merges the two adjacent regions $ O_i $ and $ O_j $ which most decrease the energy functional. In other words, the merging criterion is based on the difference between the current energy $ E(u,K) $ and the energy that would result after a merge, $ E(\hat{u},K-\partial(O_i,O_j)) $, where $ \hat{u} $ is the piecewise constant approximation of the input image $ g $, and $ \partial(O_i,O_j) $ is the common boundary between region $ O_i $ and $ O_j $. It can be shown that $ E(u,K)-E(\hat{u},K-\partial(O_i,O_j))= \lambda\cdot{L(\partial(O_i,O_j))}- {\frac{(|O_i| \cdot |O_j|)}{(|O_i|+|O_j|)}} \|c_i-c_j\|^2 $.

Once two regions are merged the following update equations are used to calculated the constant approximation of the new region:

$ c_{i,j} = \frac{(c_i |O_i| + c_j |O_j|)}{(|O_i| + |O_j|)} $.

Again, the merging of regions continues until the desired number of regions has been reached or until the desired coarseness (specified by the scale parameter $ \lambda $) has been reached.

The two outputs are possible to derive from the object: (1) u, the piecewise constant approximation (mean of the regions) to the input image set; This is currently generated by the process object pipeline and the (2) the labelled regions in the input image set is generated by the GetLabelledImage() function.

Definition at line 165 of file itkKLMRegionGrowImageFilter.h.

Public Types

typedef KLMSegmentationBorder BorderType
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::GridSizeType GridSizeType
 
typedef
ImageRegionConstIterator
< TInputImage > 
InputImageConstIterator
 
typedef TInputImage::ConstPointer InputImageConstPointer
 
typedef TInputImage::IndexType InputImageIndexType
 
typedef ImageRegionIterator
< TInputImage > 
InputImageIterator
 
typedef TInputImage::PixelType InputImagePixelType
 
typedef TInputImage::Pointer InputImagePointer
 
typedef TInputImage InputImageType
 
typedef
TInputImage::PixelType::VectorType 
InputImageVectorType
 
typedef TInputImage::RegionType InputRegionType
 
typedef KLMDynamicBorderArray
< BorderType
KLMSegmentationBorderArrayPtr
 
typedef LabelImageType::IndexType LabelImageIndexType
 
typedef ImageRegionIterator
< LabelImageType
LabelImageIterator
 
typedef LabelImageType::PixelType LabelImagePixelType
 
typedef LabelImageType::Pointer LabelImagePointer
 
typedef Image< RegionLabelType,
itkGetStaticConstMacro(LabelImageDimension) > 
LabelImageType
 
typedef vnl_vector< double > MeanRegionIntensityType
 
typedef TOutputImage::IndexType OutputImageIndexType
 
typedef ImageRegionIterator
< TOutputImage > 
OutputImageIterator
 
typedef TOutputImage::PixelType OutputImagePixelType
 
typedef TOutputImage::Pointer OutputImagePointer
 
typedef TOutputImage OutputImageType
 
typedef
TOutputImage::PixelType::VectorType 
OutputImageVectorType
 
typedef SmartPointer< SelfPointer
 
typedef
KLMSegmentationRegion::RegionLabelType 
RegionLabelType
 
typedef KLMRegionGrowImageFilter Self
 
typedef RegionGrowImageFilter
< TInputImage, TOutputImage > 
Superclass
 
- Public Types inherited from itk::RegionGrowImageFilter< TInputImage, TOutputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef TInputImage::SizeType GridSizeType
 
typedef TInputImage::ConstPointer InputImageConstPointer
 
typedef TInputImage::PixelType InputImagePixelType
 
typedef TInputImage::Pointer InputImagePointer
 
typedef TInputImage InputImageType
 
typedef TOutputImage::PixelType OutputImagePixelType
 
typedef TOutputImage::Pointer OutputImagePointer
 
typedef TOutputImage OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef RegionGrowImageFilter Self
 
typedef ImageToImageFilter
< TInputImage, TOutputImage > 
Superclass
 
- Public Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
Superclass::OutputImagePixelType 
OutputImagePixelType
 
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType
 
typedef SmartPointer< SelfPointer
 
typedef ImageToImageFilter Self
 
typedef ImageSource< TOutputImage > Superclass
 
- Public Types inherited from itk::ImageSource< TOutputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef
Superclass::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOutputImage OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef ImageSource Self
 
typedef ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef MultiThreader MultiThreaderType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
LabelImagePointer GetLabelledImage ()
 
virtual const char * GetNameOfClass () const
 
void PrintAlgorithmBorderStats ()
 
void PrintAlgorithmRegionStats ()
 
virtual void SetMaximumLambda (double _arg)
 
virtual const double & GetMaximumLambda () const
 
virtual void SetNumberOfRegions (unsigned int _arg)
 
virtual const unsigned int & GetNumberOfRegions () const
 
- Public Member Functions inherited from itk::RegionGrowImageFilter< TInputImage, TOutputImage >
virtual void SetGridSize (GridSizeType _arg)
 
virtual const GridSizeTypeGetGridSize () const
 
virtual void SetMaximumNumberOfRegions (unsigned int _arg)
 
virtual const unsigned int & GetMaximumNumberOfRegions () const
 
- Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage >
const InputImageTypeGetInput () const
 
const InputImageTypeGetInput (unsigned int idx) const
 
virtual void PopBackInput () override
 
virtual void PopFrontInput () override
 
virtual void PushBackInput (const InputImageType *image)
 
virtual void PushFrontInput (const InputImageType *image)
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
virtual void SetCoordinateTolerance (double _arg)
 
virtual double GetCoordinateTolerance () const
 
virtual void SetDirectionTolerance (double _arg)
 
virtual double GetDirectionTolerance () const
 
- Public Member Functions inherited from itk::ImageSource< TOutputImage >
OutputImageTypeGetOutput (unsigned int idx)
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *output)
 
OutputImageTypeGetOutput ()
 
const OutputImageTypeGetOutput () const
 
virtual void GraftOutput (DataObject *output)
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreaderTypeGetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
static const unsigned int InputImageVectorDimension = InputImagePixelType::Dimension
 
static const RegionLabelType LabelImageDimension = InputImageDimension
 
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 
static const unsigned int OutputImageVectorDimension = OutputImagePixelType::Dimension
 
- Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage >
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 
- Static Public Attributes inherited from itk::ImageSource< TOutputImage >
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 

Protected Member Functions

void ApplyKLM ()
 
void ApplyRegionGrowImageFilter () override
 
virtual void EnlargeOutputRequestedRegion (DataObject *) override
 
virtual void GenerateData () override
 
virtual void GenerateInputRequestedRegion () override
 
LabelImagePointer GenerateLabelledImage (LabelImageType *labelImagePtr)
 
virtual void GenerateOutputImage ()
 
void InitializeKLM ()
 
virtual void InitializeRegionParameters (InputRegionType region)
 
 KLMRegionGrowImageFilter ()
 
virtual void MergeRegions () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void ResolveRegions ()
 
 ~KLMRegionGrowImageFilter () override
 
- Protected Member Functions inherited from itk::RegionGrowImageFilter< TInputImage, TOutputImage >
void PrintSelf (std::ostream &os, Indent indent) const override
 
 RegionGrowImageFilter ()
 
 ~RegionGrowImageFilter () override
 
- Protected Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage >
virtual void CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
 
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
 
 ImageToImageFilter ()
 
virtual void VerifyInputInformation () override
 
 ~ImageToImageFilter () override
 
void PushBackInput (const DataObject *input) override
 
void PushFrontInput (const DataObject *input) override
 
- Protected Member Functions inherited from itk::ImageSource< TOutputImage >
virtual void AfterThreadedGenerateData ()
 
virtual void AllocateOutputs ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual const
ImageRegionSplitterBase
GetImageRegionSplitter () const
 
 ImageSource ()
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
 
virtual ~ImageSource () override
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryOutput (DataObject *output)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject () override
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName (void) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Types

typedef TInputImage::SizeType InputImageSizeType
 
typedef
KLMSegmentationBorder::Pointer 
KLMSegmentationBorderPtr
 
typedef
KLMSegmentationRegion::Pointer 
KLMSegmentationRegionPtr
 

Private Attributes

KLMSegmentationBorderArrayPtrm_BorderCandidate
 
std::vector
< KLMSegmentationBorderArrayPtr
m_BordersDynamicPointer
 
std::vector
< KLMSegmentationBorderPtr
m_BordersPointer
 
unsigned int m_InitialNumberOfRegions
 
double m_InitialRegionArea
 
MeanRegionIntensityType m_InitialRegionMean
 
double m_InternalLambda
 
double m_MaximumLambda
 
unsigned int m_NumberOfRegions
 
std::vector
< KLMSegmentationRegionPtr
m_RegionsPointer
 
double m_TotalBorderLength
 

Additional Inherited Members

- Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage >
typedef
ImageToImageFilterDetail::ImageRegionCopier
< itkGetStaticConstMacro(OutputImageDimension),
itkGetStaticConstMacro(InputImageDimension) > 
InputToOutputRegionCopierType
 
typedef
ImageToImageFilterDetail::ImageRegionCopier
< itkGetStaticConstMacro(InputImageDimension),
itkGetStaticConstMacro(OutputImageDimension) > 
OutputToInputRegionCopierType
 
- Static Protected Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TInputImage , typename TOutputImage >
typedef KLMSegmentationBorder itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::BorderType

Type definition for the smart border type.

Definition at line 263 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef SmartPointer< const Self > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 172 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef Superclass::GridSizeType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GridSizeType

Type definition for the input grid size type used to create initial atomic regions.

Definition at line 207 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef ImageRegionConstIterator< TInputImage > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageConstIterator

Definition at line 200 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::ConstPointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageConstPointer

Definition at line 183 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::IndexType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageIndexType

Type definition for the input image index type.

Definition at line 196 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef ImageRegionIterator< TInputImage > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageIterator

Type definition for the image iterators to be used.

Definition at line 199 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::PixelType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImagePixelType

Type definition for the input image pixel type.

Definition at line 186 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImagePointer

Definition at line 182 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::SizeType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageSizeType
private

Definition at line 360 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageType

Type definition for the input image.

Definition at line 178 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::PixelType::VectorType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageVectorType

Type definition for the input image pixel vector type.

Definition at line 189 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TInputImage::RegionType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputRegionType

Type definition for the image region type.

Definition at line 203 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef KLMDynamicBorderArray< BorderType > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::KLMSegmentationBorderArrayPtr

Type definition for the smart border pointers object.

Definition at line 266 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef KLMSegmentationBorder::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::KLMSegmentationBorderPtr
private

Definition at line 364 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef KLMSegmentationRegion::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::KLMSegmentationRegionPtr
private

Definition at line 363 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef LabelImageType::IndexType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImageIndexType

Type definition for the labelled image index type.

Definition at line 254 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef ImageRegionIterator< LabelImageType > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImageIterator

Type definition for the labelled image iterators.

Definition at line 257 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef LabelImageType::PixelType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImagePixelType

Type definition for the labelled image pixel type.

Definition at line 251 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef LabelImageType::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImagePointer

Type definition for the labelled image pointer.

Definition at line 248 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef Image< RegionLabelType, itkGetStaticConstMacro(LabelImageDimension) > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImageType

Type definition for the labelled image pixel type.

Definition at line 245 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef vnl_vector< double > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::MeanRegionIntensityType

Storage type for the mean region intensity.

Definition at line 260 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TOutputImage::IndexType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageIndexType

Type definition for the output image index type.

Definition at line 232 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef ImageRegionIterator< TOutputImage > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageIterator

Type definition for the output image iterators.

Definition at line 235 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TOutputImage::PixelType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImagePixelType

Type definition for the output image pixel type.

Definition at line 222 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TOutputImage::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImagePointer

Definition at line 211 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TOutputImage itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageType

Type definition for the output image.

Definition at line 210 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef TOutputImage::PixelType::VectorType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageVectorType

Type definition for the output image pixel vector type.

Definition at line 225 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef SmartPointer< Self > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::Pointer

Definition at line 171 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef KLMSegmentationRegion::RegionLabelType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::RegionLabelType

type definition for the region label type.

Definition at line 238 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef KLMRegionGrowImageFilter itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::Self

Standard class typedefs.

Definition at line 169 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
typedef RegionGrowImageFilter< TInputImage, TOutputImage > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::Superclass

Definition at line 170 of file itkKLMRegionGrowImageFilter.h.

Constructor & Destructor Documentation

template<typename TInputImage , typename TOutputImage >
itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::KLMRegionGrowImageFilter ( )
protected
template<typename TInputImage , typename TOutputImage >
itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::~KLMRegionGrowImageFilter ( )
overrideprotected

Member Function Documentation

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::ApplyKLM ( )
protected

Function that calls the KLM region growing algorithm.

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::ApplyRegionGrowImageFilter ( )
overrideprotectedvirtual

This is the interface function that calls the specific algorithm implementation of region growing.

Implements itk::RegionGrowImageFilter< TInputImage, TOutputImage >.

template<typename TInputImage , typename TOutputImage >
virtual::itk::LightObject::Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::CreateAnother ( ) 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::Object.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::EnlargeOutputRequestedRegion ( DataObject )
overrideprotectedvirtual

KLMRegionGrowImageFilter will produce all of the output. Therefore it must provide an implementation of EnlargeOutputRequestedRegion().

See Also
ProcessObject::EnlargeOutputRequestedRegion()

Reimplemented from itk::ProcessObject.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GenerateData ( )
overrideprotectedvirtual

Standard pipeline method.

Reimplemented from itk::ImageSource< TOutputImage >.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

KLMRegionGrowImageFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().

See Also
ProcessObject::GenerateInputRequestedRegion().

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

template<typename TInputImage , typename TOutputImage >
LabelImagePointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GenerateLabelledImage ( LabelImageType labelImagePtr)
protected

Generate the labelled image.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GenerateOutputImage ( )
protectedvirtual

Generate output approximated image.

template<typename TInputImage , typename TOutputImage >
LabelImagePointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GetLabelledImage ( )

Generate labelled image.

template<typename TInputImage , typename TOutputImage >
virtual const double& itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GetMaximumLambda ( ) const
virtual

Set/Get the desired threshold parameter for lambda. See itkSegmentationBorder documentation for details regarding this parameter.

template<typename TInputImage , typename TOutputImage >
virtual const char* itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::RegionGrowImageFilter< TInputImage, TOutputImage >.

template<typename TInputImage , typename TOutputImage >
virtual const unsigned int& itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::GetNumberOfRegions ( ) const
virtual

Set/Get the desired number of regions.

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InitializeKLM ( )
protected

Initialize the RegionGrowImageFilter algorithm.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InitializeRegionParameters ( InputRegionType  region)
protectedvirtual

Calculate the statistics representing the region. In this case we compute the mean region intensity and the area of the initial N-dimensional rectangular area. This is the function that can be overriden in order to enable a different statistical representation for region initialization.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::MergeRegions ( )
overrideprotectedvirtual

Function to merge two regions. The smaller label is always assigned to the new region. This is consistent with the connected components algorithm.

Implements itk::RegionGrowImageFilter< TInputImage, TOutputImage >.

template<typename TInputImage , typename TOutputImage >
static Pointer itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::New ( )
static

Method for creation through the object factory.

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::PrintAlgorithmBorderStats ( )

Function that prints all the border information.

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::PrintAlgorithmRegionStats ( )

Function that prints all the region information.

template<typename TInputImage , typename TOutputImage >
void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::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::ImageToImageFilter< TInputImage, TOutputImage >.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::ResolveRegions ( )
protectedvirtual

Function to resolve the region labels to be consecutively ordered. Each initial atomic region is given a new label and the aggregrate region area and mean intensity.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::SetMaximumLambda ( double  _arg)
virtual

Set/Get the desired threshold parameter for lambda. See itkSegmentationBorder documentation for details regarding this parameter.

template<typename TInputImage , typename TOutputImage >
virtual void itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::SetNumberOfRegions ( unsigned int  _arg)
virtual

Set/Get the desired number of regions.

Member Data Documentation

template<typename TInputImage , typename TOutputImage >
const unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageDimension = TInputImage::ImageDimension
static

InputImageDimension enumeration.

Definition at line 215 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
const unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::InputImageVectorDimension = InputImagePixelType::Dimension
static

InputImageVectorDimension enumeration.

Definition at line 193 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
const RegionLabelType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::LabelImageDimension = InputImageDimension
static

The dimension of the labelled image.

Definition at line 242 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
KLMSegmentationBorderArrayPtr* itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_BorderCandidate
private

Definition at line 378 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
std::vector< KLMSegmentationBorderArrayPtr > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_BordersDynamicPointer
private

Definition at line 377 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
std::vector< KLMSegmentationBorderPtr > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_BordersPointer
private

Definition at line 376 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_InitialNumberOfRegions
private

Definition at line 372 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
double itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_InitialRegionArea
private

Definition at line 381 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
MeanRegionIntensityType itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_InitialRegionMean
private

Definition at line 380 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
double itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_InternalLambda
private

Local variables.

Definition at line 371 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
double itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_MaximumLambda
private

Definition at line 366 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_NumberOfRegions
private

Definition at line 367 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
std::vector< KLMSegmentationRegionPtr > itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_RegionsPointer
private

Definition at line 375 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
double itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::m_TotalBorderLength
private

Definition at line 373 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
const unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageDimension = TOutputImage::ImageDimension
static

OutputImageDimension enumeration.

Definition at line 219 of file itkKLMRegionGrowImageFilter.h.

template<typename TInputImage , typename TOutputImage >
const unsigned int itk::KLMRegionGrowImageFilter< TInputImage, TOutputImage >::OutputImageVectorDimension = OutputImagePixelType::Dimension
static

OutputImageVectorDimension enumeration.

Definition at line 229 of file itkKLMRegionGrowImageFilter.h.


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