Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::LabelSetImageToSurfaceFilter Class Reference

Filter that generates surface meshes from a MultiLabelSegmentation image. More...

#include <mitkLabelSetImageToSurfaceFilter.h>

Inheritance diagram for mitk::LabelSetImageToSurfaceFilter:
Collaboration diagram for mitk::LabelSetImageToSurfaceFilter:

Public Types

typedef MultiLabelSegmentation::LabelValueType LabelType
 Type for label pixel values. More...
 
typedef std::map< LabelType, unsigned long > LabelMapType
 Map from label value to count/size. More...
 
typedef std::map< unsigned int, LabelType > IndexToLabelMapType
 Map from output index to label value. More...
 
- Public Types inherited from mitk::SurfaceSource
typedef Surface OutputType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseData OutputType
 Output data type. More...
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 Identifier type for named data objects. More...
 

Public Member Functions

 mitkClassMacro (LabelSetImageToSurfaceFilter, SurfaceSource)
 
const mitk::Image * GetInput (void)
 Returns a const pointer to the input image. More...
 
virtual void SetInput (const mitk::Image *image)
 
virtual void SetGenerateAllLabels (bool _arg)
 
virtual bool GetGenerateAllLabels ()
 
virtual void GenerateAllLabelsOn ()
 
virtual void GenerateAllLabelsOff ()
 
virtual void SetRequestedLabel (int _arg)
 
virtual int GetRequestedLabel ()
 
virtual void SetBackgroundLabel (int _arg)
 
virtual int GetBackgroundLabel ()
 
virtual void SetUseSmoothing (int _arg)
 
virtual void SetSigma (float _arg)
 
- Public Member Functions inherited from mitk::SurfaceSource
 mitkClassMacro (SurfaceSource, BaseDataSource)
 
Pointer Clone () const
 
mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Allocate a new output object and return it. More...
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 Allocate a new output object by name. More...
 
- Public Member Functions inherited from mitk::BaseDataSource
 mitkClassMacroItkParent (BaseDataSource, itk::ProcessObject)
 
OutputType * GetOutput ()
 
const OutputType * GetOutput () const
 
OutputType * GetOutput (DataObjectPointerArraySizeType idx)
 
const OutputType * GetOutput (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)
 Graft the specified base data object onto a named output. More...
 
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
 Check whether the pipeline is currently executing. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceSource
static Pointer New ()
 

Protected Member Functions

 LabelSetImageToSurfaceFilter ()
 
 ~LabelSetImageToSurfaceFilter () override
 
template<class T1 , class T2 , class T3 >
void mitkVtkLinearTransformPoint (T1 matrix[4][4], T2 in[3], T3 out[3])
 
template<typename TPixel , unsigned int VImageDimension>
void InternalProcessing (const itk::Image< TPixel, VImageDimension > *input, mitk::Surface *surface)
 
void GenerateData () override
 
void GenerateOutputInformation () override
 
- Protected Member Functions inherited from mitk::SurfaceSource
 SurfaceSource ()
 
 ~SurfaceSource () override
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 Constructor. More...
 
 ~BaseDataSource () override
 Destructor. More...
 

Protected Attributes

mitk::Image::Pointer m_ResultImage
 
bool m_GenerateAllLabels
 
int m_RequestedLabel
 
int m_BackgroundLabel
 
int m_UseSmoothing
 
float m_Sigma
 
LabelMapType m_AvailableLabels
 
IndexToLabelMapType m_IndexToLabels
 
mitk::Vector3D m_InputImageSpacing
 

Additional Inherited Members

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

Detailed Description

Filter that generates surface meshes from a MultiLabelSegmentation image.

This filter extracts label regions from a multi-label segmentation image and converts them into VTK surface meshes using marching cubes. It supports extracting a single label or all labels at once.

To extract surfaces for all available labels, call GenerateAllLabelsOn().

See also
MultiLabelSegmentation, SurfaceSource, LabelSetImageToSurfaceThreadedFilter

Definition at line 40 of file mitkLabelSetImageToSurfaceFilter.h.

Member Typedef Documentation

◆ IndexToLabelMapType

Map from output index to label value.

Definition at line 54 of file mitkLabelSetImageToSurfaceFilter.h.

◆ LabelMapType

Map from label value to count/size.

Definition at line 51 of file mitkLabelSetImageToSurfaceFilter.h.

◆ LabelType

Constructor & Destructor Documentation

◆ LabelSetImageToSurfaceFilter()

mitk::LabelSetImageToSurfaceFilter::LabelSetImageToSurfaceFilter ( )
protected

◆ ~LabelSetImageToSurfaceFilter()

mitk::LabelSetImageToSurfaceFilter::~LabelSetImageToSurfaceFilter ( )
overrideprotected

Member Function Documentation

◆ GenerateAllLabelsOff()

virtual void mitk::LabelSetImageToSurfaceFilter::GenerateAllLabelsOff ( )
virtual

◆ GenerateAllLabelsOn()

virtual void mitk::LabelSetImageToSurfaceFilter::GenerateAllLabelsOn ( )
virtual

◆ GenerateData()

void mitk::LabelSetImageToSurfaceFilter::GenerateData ( )
overrideprotected

◆ GenerateOutputInformation()

void mitk::LabelSetImageToSurfaceFilter::GenerateOutputInformation ( )
overrideprotected

◆ GetBackgroundLabel()

virtual int mitk::LabelSetImageToSurfaceFilter::GetBackgroundLabel ( )
virtual

Gets the label value of the background. No surface will be generated for this label.

Returns
the label of the background, by default 0

◆ GetGenerateAllLabels()

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

◆ GetInput()

const mitk::Image* mitk::LabelSetImageToSurfaceFilter::GetInput ( void  )

Returns a const pointer to the input image.

Returns
Const pointer to the input Image, or nullptr if not set.

◆ GetRequestedLabel()

virtual int mitk::LabelSetImageToSurfaceFilter::GetRequestedLabel ( )
virtual

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

Returns
the label to extract, by default 1

◆ InternalProcessing()

template<typename TPixel , unsigned int VImageDimension>
void mitk::LabelSetImageToSurfaceFilter::InternalProcessing ( const itk::Image< TPixel, VImageDimension > *  input,
mitk::Surface *  surface 
)
protected

◆ mitkClassMacro()

mitk::LabelSetImageToSurfaceFilter::mitkClassMacro ( LabelSetImageToSurfaceFilter  ,
SurfaceSource   
)

◆ mitkVtkLinearTransformPoint()

template<class T1 , class T2 , class T3 >
void mitk::LabelSetImageToSurfaceFilter::mitkVtkLinearTransformPoint ( T1  matrix[4][4],
T2  in[3],
T3  out[3] 
)
inlineprotected

Transforms a point by a 4x4 matrix

Definition at line 128 of file mitkLabelSetImageToSurfaceFilter.h.

◆ New()

static Pointer mitk::LabelSetImageToSurfaceFilter::New ( )
static

◆ SetBackgroundLabel()

virtual void mitk::LabelSetImageToSurfaceFilter::SetBackgroundLabel ( int  _arg)
virtual

Sets the label value of the background. No surface will be generated for this label.

Parameters
_argthe label of the background, by default 0

◆ SetGenerateAllLabels()

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

Set whether you want to extract all labesl (true) or a single one.

◆ SetInput()

virtual void mitk::LabelSetImageToSurfaceFilter::SetInput ( const mitk::Image *  image)
virtual

◆ SetRequestedLabel()

virtual void mitk::LabelSetImageToSurfaceFilter::SetRequestedLabel ( int  _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

◆ SetSigma()

virtual void mitk::LabelSetImageToSurfaceFilter::SetSigma ( float  _arg)
virtual

Sets the Sigma used in the gaussian smoothing

◆ SetUseSmoothing()

virtual void mitk::LabelSetImageToSurfaceFilter::SetUseSmoothing ( int  _arg)
virtual

Sets whether to provide a smoothed surface

Member Data Documentation

◆ m_AvailableLabels

LabelMapType mitk::LabelSetImageToSurfaceFilter::m_AvailableLabels
protected

Definition at line 153 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_BackgroundLabel

int mitk::LabelSetImageToSurfaceFilter::m_BackgroundLabel
protected

Definition at line 147 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_GenerateAllLabels

bool mitk::LabelSetImageToSurfaceFilter::m_GenerateAllLabels
protected

Definition at line 143 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_IndexToLabels

IndexToLabelMapType mitk::LabelSetImageToSurfaceFilter::m_IndexToLabels
protected

Definition at line 155 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_InputImageSpacing

mitk::Vector3D mitk::LabelSetImageToSurfaceFilter::m_InputImageSpacing
protected

Definition at line 157 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_RequestedLabel

int mitk::LabelSetImageToSurfaceFilter::m_RequestedLabel
protected

Definition at line 145 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_ResultImage

mitk::Image::Pointer mitk::LabelSetImageToSurfaceFilter::m_ResultImage
protected

Definition at line 138 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_Sigma

float mitk::LabelSetImageToSurfaceFilter::m_Sigma
protected

Definition at line 151 of file mitkLabelSetImageToSurfaceFilter.h.

◆ m_UseSmoothing

int mitk::LabelSetImageToSurfaceFilter::m_UseSmoothing
protected

Definition at line 149 of file mitkLabelSetImageToSurfaceFilter.h.


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