Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkBinaryLabelmapToClosedSurfaceConversionRule Class Reference

Convert binary labelmap representation (vtkOrientedImageData type) to closed surface representation (vtkPolyData type). The conversion algorithm performs a marching cubes operation on the image data followed by an optional decimation step. More...

#include <Libs/vtkSegmentationCore/vtkBinaryLabelmapToClosedSurfaceConversionRule.h>

Inheritance diagram for vtkBinaryLabelmapToClosedSurfaceConversionRule:
Inheritance graph
[legend]
Collaboration diagram for vtkBinaryLabelmapToClosedSurfaceConversionRule:
Collaboration graph
[legend]

Public Types

typedef vtkSegmentationConverterRule Superclass
 
- Public Types inherited from vtkSegmentationConverterRule
typedef vtkObject Superclass
 

Public Member Functions

vtkDataObject * ConstructRepresentationObjectByClass (std::string className) override
 
vtkDataObject * ConstructRepresentationObjectByRepresentation (std::string representationName) override
 
bool Convert (vtkSegment *segment) override
 Update the target representation based on the source representation. More...
 
bool CreateClosedSurface (vtkOrientedImageData *inputImage, vtkPolyData *outputPolydata, std::vector< int > values)
 Perform the actual binary labelmap to closed surface conversion. More...
 
vtkSegmentationConverterRuleCreateRuleInstance () override
 
virtual const char * GetClassName ()
 
unsigned int GetConversionCost (vtkDataObject *sourceRepresentation=nullptr, vtkDataObject *targetRepresentation=nullptr) override
 Get the cost of the conversion. More...
 
const char * GetName () override
 Human-readable name of the converter rule. More...
 
const char * GetSourceRepresentationName () override
 Human-readable name of the source representation. More...
 
const char * GetTargetRepresentationName () override
 Human-readable name of the target representation. More...
 
virtual int IsA (const char *type)
 
bool PostConvert (vtkSegmentation *segmentation) override
 
- Public Member Functions inherited from vtkSegmentationConverterRule
virtual vtkSegmentationConverterRuleClone ()
 Create a new instance of this rule and copy its contents. More...
 
virtual std::string GetConversionParameter (const std::string &name)
 Get a conversion parameter value. More...
 
virtual std::string GetConversionParameterDescription (const std::string &name)
 Get a conversion parameter description. More...
 
virtual void GetRuleConversionParameters (vtkSegmentationConversionParameters *conversionParameters) VTK_EXPECTS(conversionParameters !
 
bool HasConversionParameter (const std::string &name)
 Determine if the rule has a parameter with a certain name. More...
 
virtual bool PostConvert (vtkSegmentation *vtkNotUsed(segmentation))
 
virtual bool PreConvert (vtkSegmentation *vtkNotUsed(segmentation))
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetConversionParameter (const std::string &name, const std::string &value, const std::string &description="")
 Set a conversion parameter. More...
 

Static Public Member Functions

static const std::string GetComputeSurfaceNormalsParameterName ()
 Conversion parameter: compute surface normals. More...
 
static const std::string GetDecimationFactorParameterName ()
 Conversion parameter: decimation factor. More...
 
static const std::string GetJointSmoothingParameterName ()
 
static const std::string GetSmoothingFactorParameterName ()
 Conversion parameter: smoothing factor. More...
 
static int IsTypeOf (const char *type)
 
static vtkBinaryLabelmapToClosedSurfaceConversionRuleNew ()
 
static vtkBinaryLabelmapToClosedSurfaceConversionRuleSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSegmentationConverterRule
static unsigned int GetConversionInfiniteCost ()
 
static int IsTypeOf (const char *type)
 
static vtkSegmentationConverterRuleSafeDownCast (vtkObject *o)
 

Protected Member Functions

bool IsLabelmapPaddingNecessary (vtkImageData *binaryLabelMap)
 
 vtkBinaryLabelmapToClosedSurfaceConversionRule ()
 
 ~vtkBinaryLabelmapToClosedSurfaceConversionRule () override
 
- Protected Member Functions inherited from vtkSegmentationConverterRule
virtual bool CreateTargetRepresentation (vtkSegment *segment)
 Update the target representation based on the source representation. More...
 
void operator= (const vtkSegmentationConverterRule &)
 
 vtkSegmentationConverterRule ()
 
 ~vtkSegmentationConverterRule () override
 

Protected Attributes

std::map< vtkOrientedImageData *, vtkSmartPointer< vtkPolyData > > JointSmoothCache
 
- Protected Attributes inherited from vtkSegmentationConverterRule
vtkNew< vtkSegmentationConversionParametersConversionParameters
 
bool ReplaceTargetRepresentation {false}
 

Detailed Description

Convert binary labelmap representation (vtkOrientedImageData type) to closed surface representation (vtkPolyData type). The conversion algorithm performs a marching cubes operation on the image data followed by an optional decimation step.

Definition at line 38 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkBinaryLabelmapToClosedSurfaceConversionRule()

vtkBinaryLabelmapToClosedSurfaceConversionRule::vtkBinaryLabelmapToClosedSurfaceConversionRule ( )
protected

◆ ~vtkBinaryLabelmapToClosedSurfaceConversionRule()

vtkBinaryLabelmapToClosedSurfaceConversionRule::~vtkBinaryLabelmapToClosedSurfaceConversionRule ( )
overrideprotected

Member Function Documentation

◆ ConstructRepresentationObjectByClass()

vtkDataObject* vtkBinaryLabelmapToClosedSurfaceConversionRule::ConstructRepresentationObjectByClass ( std::string  className)
overridevirtual

Constructs representation object from class name for the supported representation classes (typically source and target representation VTK classes, subclasses of vtkDataObject) Note: Need to take ownership of the created object! For example using vtkSmartPointer<vtkDataObject>::Take

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

◆ ConstructRepresentationObjectByRepresentation()

vtkDataObject* vtkBinaryLabelmapToClosedSurfaceConversionRule::ConstructRepresentationObjectByRepresentation ( std::string  representationName)
overridevirtual

Constructs representation object from representation name for the supported representation classes (typically source and target representation VTK classes, subclasses of vtkDataObject) Note: Need to take ownership of the created object! For example using vtkSmartPointer<vtkDataObject>::Take

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

◆ Convert()

bool vtkBinaryLabelmapToClosedSurfaceConversionRule::Convert ( vtkSegment segment)
overridevirtual

Update the target representation based on the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

◆ CreateClosedSurface()

bool vtkBinaryLabelmapToClosedSurfaceConversionRule::CreateClosedSurface ( vtkOrientedImageData inputImage,
vtkPolyData *  outputPolydata,
std::vector< int >  values 
)

Perform the actual binary labelmap to closed surface conversion.

◆ CreateRuleInstance()

vtkSegmentationConverterRule* vtkBinaryLabelmapToClosedSurfaceConversionRule::CreateRuleInstance ( )
overridevirtual

Create instance of the default node. Similar to New but virtual method. Subclasses should implement this method by

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

◆ GetClassName()

virtual const char* vtkBinaryLabelmapToClosedSurfaceConversionRule::GetClassName ( )
virtual

◆ GetComputeSurfaceNormalsParameterName()

static const std::string vtkBinaryLabelmapToClosedSurfaceConversionRule::GetComputeSurfaceNormalsParameterName ( )
inlinestatic

Conversion parameter: compute surface normals.

Definition at line 47 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetConversionCost()

unsigned int vtkBinaryLabelmapToClosedSurfaceConversionRule::GetConversionCost ( vtkDataObject *  sourceRepresentation = nullptr,
vtkDataObject *  targetRepresentation = nullptr 
)
overridevirtual

Get the cost of the conversion.

Reimplemented from vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

◆ GetDecimationFactorParameterName()

static const std::string vtkBinaryLabelmapToClosedSurfaceConversionRule::GetDecimationFactorParameterName ( )
inlinestatic

Conversion parameter: decimation factor.

Definition at line 43 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetJointSmoothingParameterName()

static const std::string vtkBinaryLabelmapToClosedSurfaceConversionRule::GetJointSmoothingParameterName ( )
inlinestatic

Conversion parameter: joint smoothing If joint smoothing is enabled, surfaces will be created and smoothed as one vtkPolyData. Joint smoothing converts all segments in shared labelmap together, reducing smoothing artifacts.

Definition at line 51 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetName()

const char* vtkBinaryLabelmapToClosedSurfaceConversionRule::GetName ( )
inlineoverridevirtual

Human-readable name of the converter rule.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

Definition at line 82 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetSmoothingFactorParameterName()

static const std::string vtkBinaryLabelmapToClosedSurfaceConversionRule::GetSmoothingFactorParameterName ( )
inlinestatic

Conversion parameter: smoothing factor.

Definition at line 45 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetSourceRepresentationName()

const char* vtkBinaryLabelmapToClosedSurfaceConversionRule::GetSourceRepresentationName ( )
inlineoverridevirtual

Human-readable name of the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

Definition at line 85 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ GetTargetRepresentationName()

const char* vtkBinaryLabelmapToClosedSurfaceConversionRule::GetTargetRepresentationName ( )
inlineoverridevirtual

Human-readable name of the target representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkFractionalLabelmapToClosedSurfaceConversionRule.

Definition at line 88 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.

◆ IsA()

virtual int vtkBinaryLabelmapToClosedSurfaceConversionRule::IsA ( const char *  type)
virtual

◆ IsLabelmapPaddingNecessary()

bool vtkBinaryLabelmapToClosedSurfaceConversionRule::IsLabelmapPaddingNecessary ( vtkImageData *  binaryLabelMap)
protected

If input labelmap has non-background border voxels, then those regions remain open in the output closed surface. This function checks whether this is the case.

◆ IsTypeOf()

static int vtkBinaryLabelmapToClosedSurfaceConversionRule::IsTypeOf ( const char *  type)
static

◆ New()

static vtkBinaryLabelmapToClosedSurfaceConversionRule* vtkBinaryLabelmapToClosedSurfaceConversionRule::New ( )
static

◆ PostConvert()

bool vtkBinaryLabelmapToClosedSurfaceConversionRule::PostConvert ( vtkSegmentation segmentation)
override

Perform postprocessing steps on the output Clears the joint smoothing cache

◆ SafeDownCast()

static vtkBinaryLabelmapToClosedSurfaceConversionRule* vtkBinaryLabelmapToClosedSurfaceConversionRule::SafeDownCast ( vtkObject *  o)
static

Member Data Documentation

◆ JointSmoothCache

std::map<vtkOrientedImageData*, vtkSmartPointer<vtkPolyData> > vtkBinaryLabelmapToClosedSurfaceConversionRule::JointSmoothCache
protected

Cache for storing merged closed surfaces that have been joint smoothed The key used is the binary labelmap representation, which maps to the combined vtkPolyData containing surfaces for all segments in the segmentation

Definition at line 102 of file vtkBinaryLabelmapToClosedSurfaceConversionRule.h.


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