Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Abstract converter rule class. Subclasses perform conversions between specific representation types. They define source and target type and provide ways to create those types of objects. More...
#include <Libs/vtkSegmentationCore/vtkSegmentationConverterRule.h>
Public Types | |
typedef std::map< std::string, std::pair< std::string, std::string > > | ConversionParameterListType |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkSegmentationConverterRule * | Clone () |
Create a new instance of this rule and copy its contents. More... | |
virtual vtkDataObject * | ConstructRepresentationObjectByClass (std::string className)=0 |
virtual vtkDataObject * | ConstructRepresentationObjectByRepresentation (std::string representationName)=0 |
virtual bool | Convert (vtkDataObject *sourceRepresentation, vtkDataObject *targetRepresentation)=0 |
Update the target representation based on the source representation. More... | |
virtual vtkSegmentationConverterRule * | CreateRuleInstance ()=0 |
virtual const char * | GetClassName () |
virtual unsigned int | GetConversionCost (vtkDataObject *sourceRepresentation=NULL, vtkDataObject *targetRepresentation=NULL) |
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 const char * | GetName ()=0 |
Human-readable name of the converter rule. More... | |
virtual void | GetRuleConversionParameters (ConversionParameterListType &conversionParameters) |
virtual const char * | GetSourceRepresentationName ()=0 |
Human-readable name of the source representation. More... | |
virtual const char * | GetTargetRepresentationName ()=0 |
Human-readable name of the target representation. More... | |
bool | HasConversionParameter (const std::string &name) |
Determine if the rule has a parameter with a certain name. More... | |
virtual int | IsA (const char *type) |
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 unsigned int | GetConversionInfiniteCost () |
static int | IsTypeOf (const char *type) |
static vtkSegmentationConverterRule * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | operator= (const vtkSegmentationConverterRule &) |
vtkSegmentationConverterRule () | |
~vtkSegmentationConverterRule () | |
Protected Attributes | |
ConversionParameterListType | ConversionParameters |
Friends | |
class | vtkSegmentationConverter |
Abstract converter rule class. Subclasses perform conversions between specific representation types. They define source and target type and provide ways to create those types of objects.
Definition at line 49 of file vtkSegmentationConverterRule.h.
typedef std::map<std::string, std::pair<std::string, std::string> > vtkSegmentationConverterRule::ConversionParameterListType |
Conversion parameter list type. Maps the conversion parameter name to a pair consisting of the value of the parameter (the default value if it is defined in the converter rule) and the description of the parameter that appears as tooltip in the conversion parameters widget ( name => (value, description) )
Definition at line 56 of file vtkSegmentationConverterRule.h.
typedef vtkObject vtkSegmentationConverterRule::Superclass |
Definition at line 60 of file vtkSegmentationConverterRule.h.
|
protected |
|
protected |
|
virtual |
Create a new instance of this rule and copy its contents.
|
pure 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
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
pure 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
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
pure virtual |
Update the target representation based on the source representation.
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
pure virtual |
Create instance of the default node. Similar to New but virtual method. Subclasses should implement this method by
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
virtual |
|
inlinevirtual |
Get the cost of the conversion.
Reimplemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
Definition at line 90 of file vtkSegmentationConverterRule.h.
|
inlinestatic |
Constant to use for converter rules with "infinite" computational cost (i.e. disabled) It's about UINT_MAX / 400 (allows us to have a few hundred disabled rules)
Definition at line 60 of file vtkSegmentationConverterRule.h.
|
virtual |
Get a conversion parameter value.
|
virtual |
Get a conversion parameter description.
|
pure virtual |
Human-readable name of the converter rule.
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
virtual |
Get rule conversion parameters for aggregated path parameters. Existing values in the map are overwritten, missing name&values are added.
|
pure virtual |
Human-readable name of the source representation.
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
|
pure virtual |
Human-readable name of the target representation.
Implemented in vtkClosedSurfaceToBinaryLabelmapConversionRule, vtkBinaryLabelmapToClosedSurfaceConversionRule, vtkClosedSurfaceToFractionalLabelmapConversionRule, and vtkFractionalLabelmapToClosedSurfaceConversionRule.
bool vtkSegmentationConverterRule::HasConversionParameter | ( | const std::string & | name | ) |
Determine if the rule has a parameter with a certain name.
|
virtual |
|
static |
|
protected |
|
static |
|
virtual |
Set a conversion parameter.
|
friend |
Definition at line 135 of file vtkSegmentationConverterRule.h.
|
protected |
Dictionary of conversion parameters in form of name -> default value, description. Each conversion rule defines its required/possible conversion parameters, and sets possible default values whenever applicable. Required parameters have empty defaults. When the user changes the parameter value, then the default is being overwritten to contain the custom value, but for new segmentations, it is initially the default.
Definition at line 133 of file vtkSegmentationConverterRule.h.