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

Filter that computes surface normals for contour edge points. More...

#include <mitkComputeContourSetNormalsFilter.h>

Inheritance diagram for mitk::ComputeContourSetNormalsFilter:
Collaboration diagram for mitk::ComputeContourSetNormalsFilter:

Public Member Functions

 mitkClassMacro (ComputeContourSetNormalsFilter, SurfaceToSurfaceFilter)
 
Pointer Clone () const
 
mitk::Surface::Pointer GetNormalsAsSurface ()
 Return the computed normals as a mitk::Surface. More...
 
void Reset ()
 Reset the filter by removing all inputs and outputs. More...
 
void SetMaxSpacing (double maxSpacing)
 Set the maximum voxel spacing of the original image. More...
 
void SetUseProgressBar (bool status)
 Enable or disable the MITK progress bar during computation. More...
 
void SetProgressStepSize (unsigned int stepSize)
 Set the step size by which the progress bar advances per contour. More...
 
void SetSegmentationBinaryImage (mitk::Image *segmentationImage)
 Set the segmentation binary image for normal direction validation. More...
 
- Public Member Functions inherited from mitk::SurfaceToSurfaceFilter
 mitkClassMacro (SurfaceToSurfaceFilter, mitk::SurfaceSource)
 
Pointer Clone () const
 
virtual void SetInput (const mitk::Surface *surface)
 Set the input surface at index 0. More...
 
virtual void SetInput (unsigned int idx, const mitk::Surface *surface)
 Set the input surface at the given index. More...
 
virtual const mitk::Surface * GetInput ()
 Get the input surface at index 0. More...
 
virtual const mitk::Surface * GetInput (unsigned int idx)
 Get the input surface at the given index. More...
 
virtual void CreateOutputForInput (unsigned int idx)
 Create a new output for the input at the given index. More...
 
virtual void CreateOutputsForAllInputs ()
 Create outputs for all existing inputs. More...
 
virtual void RemoveInputs (mitk::Surface *surface)
 Remove all inputs matching the given surface. More...
 
- 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::SurfaceToSurfaceFilter
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceSource
static Pointer New ()
 

Protected Member Functions

 ComputeContourSetNormalsFilter ()
 
 ~ComputeContourSetNormalsFilter () override
 
void GenerateData () override
 
void GenerateOutputInformation () override
 
- Protected Member Functions inherited from mitk::SurfaceToSurfaceFilter
 SurfaceToSurfaceFilter ()
 
 ~SurfaceToSurfaceFilter () 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...
 

Additional Inherited Members

- Public Types inherited from mitk::SurfaceToSurfaceFilter
typedef itk::DataObject::Pointer DataObjectPointer
 
- 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...
 
- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Filter that computes surface normals for contour edge points.

Takes a set of contour surfaces (represented as vtkPolygon-based mitk::Surface objects) and computes normal vectors for each contour edge point. The computed normals can be accessed on the output surfaces via:

filter->GetOutput(i)->GetVtkPolyData()->GetCellData()->GetNormals();

If a segmentation binary image is provided via SetSegmentationBinaryImage(), the filter ensures that the computed normals point away from (not into) the segmented region.

See also
ReduceContourSetFilter, CreateDistanceImageFromSurfaceFilter, SurfaceInterpolationController

Definition at line 48 of file mitkComputeContourSetNormalsFilter.h.

Constructor & Destructor Documentation

◆ ComputeContourSetNormalsFilter()

mitk::ComputeContourSetNormalsFilter::ComputeContourSetNormalsFilter ( )
protected

◆ ~ComputeContourSetNormalsFilter()

mitk::ComputeContourSetNormalsFilter::~ComputeContourSetNormalsFilter ( )
overrideprotected

Member Function Documentation

◆ Clone()

Pointer mitk::ComputeContourSetNormalsFilter::Clone ( ) const

◆ GenerateData()

void mitk::ComputeContourSetNormalsFilter::GenerateData ( )
overrideprotected

◆ GenerateOutputInformation()

void mitk::ComputeContourSetNormalsFilter::GenerateOutputInformation ( )
overrideprotected

◆ GetNormalsAsSurface()

mitk::Surface::Pointer mitk::ComputeContourSetNormalsFilter::GetNormalsAsSurface ( )

Return the computed normals as a mitk::Surface.

The returned surface contains the normal vectors as cell data.

Returns
Surface containing the computed normal vectors.

◆ mitkClassMacro()

mitk::ComputeContourSetNormalsFilter::mitkClassMacro ( ComputeContourSetNormalsFilter  ,
SurfaceToSurfaceFilter   
)

◆ New()

static Pointer mitk::ComputeContourSetNormalsFilter::New ( )
static

◆ Reset()

void mitk::ComputeContourSetNormalsFilter::Reset ( )

Reset the filter by removing all inputs and outputs.

◆ SetMaxSpacing()

void mitk::ComputeContourSetNormalsFilter::SetMaxSpacing ( double  maxSpacing)

Set the maximum voxel spacing of the original image.

Used to determine the sampling distance for normal computation.

Parameters
[in]maxSpacingThe maximum spacing value.

◆ SetProgressStepSize()

void mitk::ComputeContourSetNormalsFilter::SetProgressStepSize ( unsigned int  stepSize)

Set the step size by which the progress bar advances per contour.

Parameters
[in]stepSizeThe progress increment per processed contour.

◆ SetSegmentationBinaryImage()

void mitk::ComputeContourSetNormalsFilter::SetSegmentationBinaryImage ( mitk::Image *  segmentationImage)
inline

Set the segmentation binary image for normal direction validation.

When set, the filter checks that computed normals point outward (away from the segmented region) and flips them if necessary.

Parameters
[in]segmentationImagePointer to the binary segmentation image.

Definition at line 91 of file mitkComputeContourSetNormalsFilter.h.

◆ SetUseProgressBar()

void mitk::ComputeContourSetNormalsFilter::SetUseProgressBar ( bool  status)

Enable or disable the MITK progress bar during computation.

Parameters
[in]statusTrue to use the progress bar, false to disable it.

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