Medical Imaging Interaction Toolkit  2016.11.0
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
 
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
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual 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

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

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 38 of file mitkLabeledImageToSurfaceFilter.h.

Member Typedef Documentation

Definition at line 49 of file mitkLabeledImageToSurfaceFilter.h.

Definition at line 47 of file mitkLabeledImageToSurfaceFilter.h.

Constructor & Destructor Documentation

mitk::LabeledImageToSurfaceFilter::LabeledImageToSurfaceFilter ( )
protected

Definition at line 34 of file mitkLabeledImageToSurfaceFilter.cpp.

mitk::LabeledImageToSurfaceFilter::~LabeledImageToSurfaceFilter ( )
protectedvirtual

Definition at line 39 of file mitkLabeledImageToSurfaceFilter.cpp.

Member Function Documentation

Pointer mitk::LabeledImageToSurfaceFilter::Clone ( ) const
void mitk::LabeledImageToSurfaceFilter::CreateSurface ( int  time,
vtkImageData *  vtkimage,
mitk::Surface surface,
LabelType  label 
)
protectedvirtual
virtual void mitk::LabeledImageToSurfaceFilter::GenerateAllLabelsOff ( )
virtual
virtual void mitk::LabeledImageToSurfaceFilter::GenerateAllLabelsOn ( )
virtual
void mitk::LabeledImageToSurfaceFilter::GenerateData ( )
overrideprotectedvirtual

For each image time slice a surface will be created. This method is called by Update().

Reimplemented from mitk::ImageToSurfaceFilter.

Definition at line 118 of file mitkLabeledImageToSurfaceFilter.cpp.

References mitk::SlicedData::GetRequestedRegion(), and mitk::Image::GetVtkImageData().

void mitk::LabeledImageToSurfaceFilter::GenerateOutputInformation ( )
overrideprotectedvirtual

Initializes the output information ( i.e. the geometry information ) of the output of the filter

Reimplemented from mitk::ImageToSurfaceFilter.

Definition at line 43 of file mitkLabeledImageToSurfaceFilter.cpp.

References mitk::BaseData::GetTimeGeometry().

mitk::LabeledImageToSurfaceFilter::LabelMapType mitk::LabeledImageToSurfaceFilter::GetAvailableLabels ( )
protectedvirtual
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
virtual double mitk::LabeledImageToSurfaceFilter::GetGaussianStandardDeviation ( )
virtual

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

virtual bool mitk::LabeledImageToSurfaceFilter::GetGenerateAllLabels ( )
virtual
Returns
if all labels or only a specific label should be extracted.
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
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 324 of file mitkLabeledImageToSurfaceFilter.cpp.

References max().

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 345 of file mitkLabeledImageToSurfaceFilter.cpp.

References mitk::SlicedData::GetSlicedGeometry(), and mitk::BaseGeometry::GetSpacing().

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 340 of file mitkLabeledImageToSurfaceFilter.cpp.

mitk::LabeledImageToSurfaceFilter::mitkClassMacro ( LabeledImageToSurfaceFilter  ,
ImageToSurfaceFilter   
)
static Pointer mitk::LabeledImageToSurfaceFilter::New ( )
static
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
virtual void mitk::LabeledImageToSurfaceFilter::SetGaussianStandardDeviation ( double  _arg)
virtual

Set standard deviation for Gaussian Filter.

Parameters
_argby default 1.5
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
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

LabelMapType mitk::LabeledImageToSurfaceFilter::m_AvailableLabels
protected

Definition at line 141 of file mitkLabeledImageToSurfaceFilter.h.

LabelType mitk::LabeledImageToSurfaceFilter::m_BackgroundLabel
protected

Definition at line 139 of file mitkLabeledImageToSurfaceFilter.h.

double mitk::LabeledImageToSurfaceFilter::m_GaussianStandardDeviation
protected

Definition at line 133 of file mitkLabeledImageToSurfaceFilter.h.

bool mitk::LabeledImageToSurfaceFilter::m_GenerateAllLabels
protected

Definition at line 135 of file mitkLabeledImageToSurfaceFilter.h.

IdxToLabelMapType mitk::LabeledImageToSurfaceFilter::m_IdxToLabels
protected

Definition at line 143 of file mitkLabeledImageToSurfaceFilter.h.

LabelType mitk::LabeledImageToSurfaceFilter::m_Label
protected

Definition at line 137 of file mitkLabeledImageToSurfaceFilter.h.


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