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
vtkClosedSurfaceToBinaryLabelmapConversionRule Class Reference

Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrientedImageData type). The conversion algorithm is based on image stencil. More...

#include <Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.h>

Inheritance diagram for vtkClosedSurfaceToBinaryLabelmapConversionRule:
Inheritance graph
[legend]
Collaboration diagram for vtkClosedSurfaceToBinaryLabelmapConversionRule:
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...
 
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
 
virtual void SetUseOutputImageDataGeometry (bool)
 
- 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 GetCollapseLabelmapsParameterName ()
 
static const std::string GetCropToReferenceImageGeometryParameterName ()
 
static const std::string GetOversamplingFactorParameterName ()
 
static int IsTypeOf (const char *type)
 
static vtkClosedSurfaceToBinaryLabelmapConversionRuleNew ()
 
static vtkClosedSurfaceToBinaryLabelmapConversionRuleSafeDownCast (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 CalculateOutputGeometry (vtkPolyData *closedSurfacePolyData, vtkOrientedImageData *geometryImageData)
 
std::string GetDefaultImageGeometryStringForPolyData (vtkPolyData *polyData)
 
 vtkClosedSurfaceToBinaryLabelmapConversionRule ()
 
 ~vtkClosedSurfaceToBinaryLabelmapConversionRule () 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

bool UseOutputImageDataGeometry {false}
 
- Protected Attributes inherited from vtkSegmentationConverterRule
vtkNew< vtkSegmentationConversionParametersConversionParameters
 
bool ReplaceTargetRepresentation {false}
 

Detailed Description

Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrientedImageData type). The conversion algorithm is based on image stencil.

Definition at line 36 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkClosedSurfaceToBinaryLabelmapConversionRule()

vtkClosedSurfaceToBinaryLabelmapConversionRule::vtkClosedSurfaceToBinaryLabelmapConversionRule ( )
protected

◆ ~vtkClosedSurfaceToBinaryLabelmapConversionRule()

vtkClosedSurfaceToBinaryLabelmapConversionRule::~vtkClosedSurfaceToBinaryLabelmapConversionRule ( )
overrideprotected

Member Function Documentation

◆ CalculateOutputGeometry()

bool vtkClosedSurfaceToBinaryLabelmapConversionRule::CalculateOutputGeometry ( vtkPolyData *  closedSurfacePolyData,
vtkOrientedImageData geometryImageData 
)
protected

Calculate actual geometry of the output labelmap volume by verifying that the reference image geometry encompasses the input surface model, and extending it to the proper directions if necessary.

Parameters
closedSurfacePolyDataInput closed surface poly data to convert
geometryImageDataOutput image data containing output labelmap geometry. Memory is not allocated for voxel data.
Returns
Success flag indicating sane calculated extents

◆ ConstructRepresentationObjectByClass()

vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::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 vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ ConstructRepresentationObjectByRepresentation()

vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::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 vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ Convert()

bool vtkClosedSurfaceToBinaryLabelmapConversionRule::Convert ( vtkSegment segment)
overridevirtual

Update the target representation based on the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ CreateRuleInstance()

vtkSegmentationConverterRule* vtkClosedSurfaceToBinaryLabelmapConversionRule::CreateRuleInstance ( )
overridevirtual

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

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ GetClassName()

virtual const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetClassName ( )
virtual

◆ GetCollapseLabelmapsParameterName()

static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetCollapseLabelmapsParameterName ( )
inlinestatic

Determines if the output binary labelmaps should be reduced to as few shared labelmaps as possible after conversion. A value of 1 means that the labelmaps will be collapsed, while a value of 0 means that they will not be collapsed.

Definition at line 48 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ GetConversionCost()

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

Get the cost of the conversion.

Reimplemented from vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ GetCropToReferenceImageGeometryParameterName()

static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetCropToReferenceImageGeometryParameterName ( )
inlinestatic

◆ GetDefaultImageGeometryStringForPolyData()

std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetDefaultImageGeometryStringForPolyData ( vtkPolyData *  polyData)
protected

Get default image geometry string in case of absence of parameter. The default geometry has identity directions and 1 mm uniform spacing, with origin and extent defined using the argument poly data.

Parameters
polyDataPoly data defining the origin and extent of the default geometry
Returns
Serialized image geometry for input poly data with identity directions and 1 mm spacing.

◆ GetName()

const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetName ( )
inlineoverridevirtual

Human-readable name of the converter rule.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 76 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ GetOversamplingFactorParameterName()

static const std::string vtkClosedSurfaceToBinaryLabelmapConversionRule::GetOversamplingFactorParameterName ( )
inlinestatic

Conversion parameter: oversampling factor Determines the oversampling of the reference image geometry. If it's a number, then all segments are oversampled with the same value (value of 1 means no oversampling). If it has the value "A", then automatic oversampling is calculated.

Definition at line 44 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ GetSourceRepresentationName()

const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetSourceRepresentationName ( )
inlineoverridevirtual

Human-readable name of the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 79 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ GetTargetRepresentationName()

const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetTargetRepresentationName ( )
inlineoverridevirtual

Human-readable name of the target representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 82 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ IsA()

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

◆ IsTypeOf()

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

◆ New()

static vtkClosedSurfaceToBinaryLabelmapConversionRule* vtkClosedSurfaceToBinaryLabelmapConversionRule::New ( )
static

◆ PostConvert()

bool vtkClosedSurfaceToBinaryLabelmapConversionRule::PostConvert ( vtkSegmentation segmentation)
override

Perform postprocessing steps on the output Collapses the segments to as few labelmaps as is possible

◆ SafeDownCast()

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

◆ SetUseOutputImageDataGeometry()

virtual void vtkClosedSurfaceToBinaryLabelmapConversionRule::SetUseOutputImageDataGeometry ( bool  )
virtual

Member Data Documentation

◆ UseOutputImageDataGeometry

bool vtkClosedSurfaceToBinaryLabelmapConversionRule::UseOutputImageDataGeometry {false}
protected

Flag determining whether to use the geometry of the given output oriented image data as is, or use the conversion parameters and the extent of the input surface. False by default, because pre-calculating the geometry of the output image data is not trivial and should be done only when there is a specific reason to do that (such as doing the conversion for sub-volumes and then stitching them back together).

Definition at line 107 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.


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