Slicer  4.8
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 std::map< std::string, std::pair< std::string, std::string > > ConversionParameterListType
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkDataObject * ConstructRepresentationObjectByClass (std::string className) VTK_OVERRIDE
 
virtual vtkDataObject * ConstructRepresentationObjectByRepresentation (std::string representationName) VTK_OVERRIDE
 
virtual bool Convert (vtkDataObject *sourceRepresentation, vtkDataObject *targetRepresentation) VTK_OVERRIDE
 Update the target representation based on the source representation. More...
 
virtual vtkSegmentationConverterRuleCreateRuleInstance () VTK_OVERRIDE
 
virtual const char * GetClassName ()
 
virtual unsigned int GetConversionCost (vtkDataObject *sourceRepresentation=NULL, vtkDataObject *targetRepresentation=NULL) VTK_OVERRIDE
 Get the cost of the conversion. More...
 
virtual const char * GetName () VTK_OVERRIDE
 Human-readable name of the converter rule. More...
 
virtual const char * GetSourceRepresentationName () VTK_OVERRIDE
 Human-readable name of the source representation. More...
 
virtual const char * GetTargetRepresentationName () VTK_OVERRIDE
 Human-readable name of the target representation. More...
 
virtual int IsA (const char *type)
 
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 (ConversionParameterListType &conversionParameters)
 
bool HasConversionParameter (const std::string &name)
 Determine if the rule has a parameter with a certain name. More...
 
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 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)
 
void operator= (const vtkClosedSurfaceToBinaryLabelmapConversionRule &)
 
 vtkClosedSurfaceToBinaryLabelmapConversionRule ()
 
 ~vtkClosedSurfaceToBinaryLabelmapConversionRule ()
 
- Protected Member Functions inherited from vtkSegmentationConverterRule
void operator= (const vtkSegmentationConverterRule &)
 
 vtkSegmentationConverterRule ()
 
 ~vtkSegmentationConverterRule ()
 

Protected Attributes

bool UseOutputImageDataGeometry
 
- Protected Attributes inherited from vtkSegmentationConverterRule
ConversionParameterListType ConversionParameters
 

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 ( )
protected

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 dummy image data containing output labelmap geometry
Returns
Success flag indicating sane calculated extents

◆ ConstructRepresentationObjectByClass()

virtual vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::ConstructRepresentationObjectByClass ( std::string  className)
virtual

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()

virtual vtkDataObject* vtkClosedSurfaceToBinaryLabelmapConversionRule::ConstructRepresentationObjectByRepresentation ( std::string  representationName)
virtual

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()

virtual bool vtkClosedSurfaceToBinaryLabelmapConversionRule::Convert ( vtkDataObject *  sourceRepresentation,
vtkDataObject *  targetRepresentation 
)
virtual

Update the target representation based on the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

◆ CreateRuleInstance()

virtual vtkSegmentationConverterRule* vtkClosedSurfaceToBinaryLabelmapConversionRule::CreateRuleInstance ( )
virtual

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

◆ GetConversionCost()

virtual unsigned int vtkClosedSurfaceToBinaryLabelmapConversionRule::GetConversionCost ( vtkDataObject *  sourceRepresentation = NULL,
vtkDataObject *  targetRepresentation = NULL 
)
virtual

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()

virtual const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetName ( )
inlinevirtual

Human-readable name of the converter rule.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 69 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()

virtual const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetSourceRepresentationName ( )
inlinevirtual

Human-readable name of the source representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 72 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.

◆ GetTargetRepresentationName()

virtual const char* vtkClosedSurfaceToBinaryLabelmapConversionRule::GetTargetRepresentationName ( )
inlinevirtual

Human-readable name of the target representation.

Implements vtkSegmentationConverterRule.

Reimplemented in vtkClosedSurfaceToFractionalLabelmapConversionRule.

Definition at line 75 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

◆ operator=()

void vtkClosedSurfaceToBinaryLabelmapConversionRule::operator= ( const vtkClosedSurfaceToBinaryLabelmapConversionRule )
protected

◆ SafeDownCast()

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

◆ SetUseOutputImageDataGeometry()

virtual void vtkClosedSurfaceToBinaryLabelmapConversionRule::SetUseOutputImageDataGeometry ( bool  )
virtual

Member Data Documentation

◆ UseOutputImageDataGeometry

bool vtkClosedSurfaceToBinaryLabelmapConversionRule::UseOutputImageDataGeometry
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 100 of file vtkClosedSurfaceToBinaryLabelmapConversionRule.h.


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