Medical Imaging Interaction Toolkit  2018.4.99-18ddd2ed
Medical Imaging Interaction Toolkit
mitk::LabeledImageToSurfaceFilter Class Reference

#include <mitkLabeledImageToSurfaceFilter.h>

Inheritance diagram for mitk::LabeledImageToSurfaceFilter:
Collaboration diagram for mitk::LabeledImageToSurfaceFilter:

Public Types

typedef int LabelType
 
typedef std::map< LabelType, unsigned long > LabelMapType
 
typedef std::map< unsigned int, LabelTypeIdxToLabelMapType
 
- Public Types inherited from mitk::ImageToSurfaceFilter
enum  DecimationType { NoDecimation, DecimatePro, QuadricDecimation }
 
typedef ImageToSurfaceFilter Self
 
typedef SurfaceSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::SurfaceSource
typedef SurfaceSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Surface OutputType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseDataSource Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef BaseData OutputType
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 

Public Member Functions

 mitkClassMacro (LabeledImageToSurfaceFilter, ImageToSurfaceFilter)
 
Pointer Clone () const
 
virtual void SetGenerateAllLabels (bool _arg)
 
virtual bool GetGenerateAllLabels ()
 
virtual void GenerateAllLabelsOn ()
 
virtual void GenerateAllLabelsOff ()
 
virtual void SetLabel (LabelType _arg)
 
virtual LabelType GetLabel ()
 
virtual void SetBackgroundLabel (LabelType _arg)
 
virtual LabelType GetBackgroundLabel ()
 
virtual void SetGaussianStandardDeviation (double _arg)
 
virtual double GetGaussianStandardDeviation ()
 
LabelType GetLabelForNthOutput (const unsigned int &i)
 
mitk::ScalarType GetVolumeForNthOutput (const unsigned int &i)
 
mitk::ScalarType GetVolumeForLabel (const LabelType &label)
 
- Public Member Functions inherited from mitk::ImageToSurfaceFilter
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
void GenerateData () override
 
void GenerateOutputInformation () override
 
const mitk::ImageGetInput (void)
 
virtual void SetInput (const mitk::Image *image)
 
void SetSmoothIteration (int smoothIteration)
 
void SetSmoothRelaxation (float smoothRelaxation)
 
virtual void SetThreshold (ScalarType _arg)
 
virtual ScalarType GetThreshold () const
 
virtual void SetSmooth (bool _arg)
 
virtual void SmoothOn ()
 
virtual void SmoothOff ()
 
virtual bool GetSmooth () const
 
virtual DecimationType GetDecimate () const
 
virtual void SetDecimate (DecimationType _arg)
 
virtual void SetTargetReduction (float _arg)
 
virtual float GetTargetReduction () const
 
template<class T1 , class T2 , class T3 >
void mitkVtkLinearTransformPoint (T1 matrix[4][4], T2 in[3], T3 out[3])
 
- Public Member Functions inherited from mitk::SurfaceSource
Pointer Clone () const
 
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
- Public Member Functions inherited from mitk::BaseDataSource
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Access itk::ProcessObject::m_Updating. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageToSurfaceFilter
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceSource
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

void GenerateData () override
 
void GenerateOutputInformation () override
 
virtual void CreateSurface (int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label)
 
virtual LabelMapType GetAvailableLabels ()
 
 LabeledImageToSurfaceFilter ()
 
 ~LabeledImageToSurfaceFilter () override
 
- Protected Member Functions inherited from mitk::ImageToSurfaceFilter
 ImageToSurfaceFilter ()
 
 ~ImageToSurfaceFilter () override
 
void CreateSurface (int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold)
 
- Protected Member Functions inherited from mitk::SurfaceSource
 SurfaceSource ()
 
 ~SurfaceSource () override
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
 ~BaseDataSource () override
 

Protected Attributes

double m_GaussianStandardDeviation
 
bool m_GenerateAllLabels
 
LabelType m_Label
 
LabelType m_BackgroundLabel
 
LabelMapType m_AvailableLabels
 
IdxToLabelMapType m_IdxToLabels
 
- Protected Attributes inherited from mitk::ImageToSurfaceFilter
bool m_Smooth
 
DecimationType m_Decimate
 
ScalarType m_Threshold
 
float m_TargetReduction
 
int m_SmoothIteration
 
float m_SmoothRelaxation
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Calculates surfaces for labeled images. If you have a labeled image containing 5 different labeled regions plus the background, this class creates 5 surface representations from the regions. Each surface is assigned to one output of the filter. You can figure out, which label corresponds to which output using the GetLabelForNthOutput() method. If you want to calculate a surface representation only for one specific label, you may call GenerateAllLabelsOff() and set the desired label by SetLabel(label).

Definition at line 34 of file mitkLabeledImageToSurfaceFilter.h.

Member Typedef Documentation

◆ IdxToLabelMapType

Definition at line 47 of file mitkLabeledImageToSurfaceFilter.h.

◆ LabelMapType

Definition at line 45 of file mitkLabeledImageToSurfaceFilter.h.

◆ LabelType

Constructor & Destructor Documentation

◆ LabeledImageToSurfaceFilter()

mitk::LabeledImageToSurfaceFilter::LabeledImageToSurfaceFilter ( )
protected

Definition at line 30 of file mitkLabeledImageToSurfaceFilter.cpp.

◆ ~LabeledImageToSurfaceFilter()

mitk::LabeledImageToSurfaceFilter::~LabeledImageToSurfaceFilter ( )
overrideprotected

Definition at line 35 of file mitkLabeledImageToSurfaceFilter.cpp.

Member Function Documentation

◆ Clone()

Pointer mitk::LabeledImageToSurfaceFilter::Clone ( ) const

◆ CreateSurface()

◆ GenerateAllLabelsOff()

virtual void mitk::LabeledImageToSurfaceFilter::GenerateAllLabelsOff ( )
virtual

◆ GenerateAllLabelsOn()

virtual void mitk::LabeledImageToSurfaceFilter::GenerateAllLabelsOn ( )
virtual

◆ GenerateData()

◆ GenerateOutputInformation()

◆ GetAvailableLabels()

◆ GetBackgroundLabel()

virtual LabelType mitk::LabeledImageToSurfaceFilter::GetBackgroundLabel ( )
virtual

Returns the label of the background. No surface will be generated for this label!

Returns
the label of the background, by default 0

◆ GetGaussianStandardDeviation()

virtual double mitk::LabeledImageToSurfaceFilter::GetGaussianStandardDeviation ( )
virtual

Returns the standard deviation of the Gaussian filter which will be used when filter is enabled.

Referenced by CreateSurface().

◆ GetGenerateAllLabels()

virtual bool mitk::LabeledImageToSurfaceFilter::GetGenerateAllLabels ( )
virtual
Returns
if all labels or only a specific label should be extracted.

◆ GetLabel()

virtual LabelType mitk::LabeledImageToSurfaceFilter::GetLabel ( )
virtual

Returns the label you want to extract. This method only has an effect, if GenerateAllLabels() is set to false

Returns
_arg the label to extract, by default 1

◆ GetLabelForNthOutput()

mitk::LabeledImageToSurfaceFilter::LabelType mitk::LabeledImageToSurfaceFilter::GetLabelForNthOutput ( const unsigned int &  i)

Lets you retrieve the label which was used for generating the Nth output of this filter. If GenerateAllLabels() is set to false, this filter only knows about the label provided via SetLabel(). All other labels in the image are not known.

Parameters
ithe index of the Nth output.
Returns
the label used for calculating the Nth output of the filter. If i is out of range, itk::NumericLimits<LabelType>::max() is returned.

Definition at line 320 of file mitkLabeledImageToSurfaceFilter.cpp.

References m_IdxToLabels, and max().

Referenced by GetVolumeForNthOutput().

◆ GetVolumeForLabel()

mitk::ScalarType mitk::LabeledImageToSurfaceFilter::GetVolumeForLabel ( const LabelType label)

Lets you retrieve the volume in milliliters of the region with the given label. If GenerateAllLabels is set to false, you may only call this method for the label provided using the SetLabel() method.

Parameters
labelthe label of the region you want to get the volume of
Returns
the volume of the region with the given label. If label is invalid, 0.0 is returned.

Definition at line 341 of file mitkLabeledImageToSurfaceFilter.cpp.

References mitk::ImageToSurfaceFilter::GetInput(), mitk::SlicedData::GetSlicedGeometry(), mitk::BaseGeometry::GetSpacing(), image, and m_AvailableLabels.

Referenced by GetVolumeForNthOutput().

◆ GetVolumeForNthOutput()

mitk::ScalarType mitk::LabeledImageToSurfaceFilter::GetVolumeForNthOutput ( const unsigned int &  i)

Lets you retrieve the volume in milliliters of the region used to generate the Nth output.

Parameters
ithe index of the Nth output.
Returns
the volume of the region used to generate the Nth output of the filter. If i is out of range, 0.0 is returned.

Definition at line 336 of file mitkLabeledImageToSurfaceFilter.cpp.

References GetLabelForNthOutput(), and GetVolumeForLabel().

◆ mitkClassMacro()

mitk::LabeledImageToSurfaceFilter::mitkClassMacro ( LabeledImageToSurfaceFilter  ,
ImageToSurfaceFilter   
)

◆ New()

static Pointer mitk::LabeledImageToSurfaceFilter::New ( )
static

◆ SetBackgroundLabel()

virtual void mitk::LabeledImageToSurfaceFilter::SetBackgroundLabel ( LabelType  _arg)
virtual

Set the label of the background. No surface will be generated for this label!

Parameters
_argthe label of the background, by default 0

◆ SetGaussianStandardDeviation()

virtual void mitk::LabeledImageToSurfaceFilter::SetGaussianStandardDeviation ( double  _arg)
virtual

Set standard deviation for Gaussian Filter.

Parameters
_argby default 1.5

◆ SetGenerateAllLabels()

virtual void mitk::LabeledImageToSurfaceFilter::SetGenerateAllLabels ( bool  _arg)
virtual

Set whether you want to extract all (true) or only a specific label (false)

Parameters
_argtrue by default

◆ SetLabel()

virtual void mitk::LabeledImageToSurfaceFilter::SetLabel ( LabelType  _arg)
virtual

Set the label you want to extract. This method only has an effect, if GenerateAllLabels() is set to false

Parameters
_argthe label to extract, by default 1

Member Data Documentation

◆ m_AvailableLabels

LabelMapType mitk::LabeledImageToSurfaceFilter::m_AvailableLabels
protected

◆ m_BackgroundLabel

LabelType mitk::LabeledImageToSurfaceFilter::m_BackgroundLabel
protected

Definition at line 137 of file mitkLabeledImageToSurfaceFilter.h.

Referenced by GenerateData(), and GenerateOutputInformation().

◆ m_GaussianStandardDeviation

double mitk::LabeledImageToSurfaceFilter::m_GaussianStandardDeviation
protected

Definition at line 131 of file mitkLabeledImageToSurfaceFilter.h.

◆ m_GenerateAllLabels

bool mitk::LabeledImageToSurfaceFilter::m_GenerateAllLabels
protected

Definition at line 133 of file mitkLabeledImageToSurfaceFilter.h.

Referenced by GenerateData(), and GenerateOutputInformation().

◆ m_IdxToLabels

IdxToLabelMapType mitk::LabeledImageToSurfaceFilter::m_IdxToLabels
protected

◆ m_Label

LabelType mitk::LabeledImageToSurfaceFilter::m_Label
protected

Definition at line 135 of file mitkLabeledImageToSurfaceFilter.h.

Referenced by GenerateOutputInformation().


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