21 #ifndef __vtkSegmentationConverterRule_h 22 #define __vtkSegmentationConverterRule_h 24 #include "vtkSegmentationCoreConfigure.h" 27 #include <vtkObject.h> 36 #ifndef vtkSegmentationConverterRuleNewMacro 37 #define vtkSegmentationConverterRuleNewMacro(newClass) \ 38 vtkStandardNewMacro(newClass); \ 39 vtkSegmentationConverterRule* newClass::CreateRuleInstance() \ 41 return newClass::New(); \ 60 static unsigned int GetConversionInfiniteCost() {
return 10000000; };
76 virtual vtkDataObject* ConstructRepresentationObjectByRepresentation(std::string representationName) = 0;
81 virtual vtkDataObject* ConstructRepresentationObjectByClass(std::string className) = 0;
84 virtual bool Convert(vtkDataObject* sourceRepresentation, vtkDataObject* targetRepresentation) = 0;
90 virtual unsigned int GetConversionCost(vtkDataObject* sourceRepresentation=NULL, vtkDataObject* targetRepresentation=NULL)
92 (void)(sourceRepresentation);
93 (void)(targetRepresentation);
98 virtual const char* GetName() = 0;
101 virtual const char* GetSourceRepresentationName() = 0;
104 virtual const char* GetTargetRepresentationName() = 0;
108 virtual void GetRuleConversionParameters(ConversionParameterListType& conversionParameters);
111 virtual void SetConversionParameter(
const std::string& name,
const std::string& value,
const std::string& description=
"");
114 virtual std::string GetConversionParameter(
const std::string& name);
117 virtual std::string GetConversionParameterDescription(
const std::string& name);
120 bool HasConversionParameter(
const std::string& name);
138 #endif // __vtkSegmentationConverterRule_h ConversionParameterListType ConversionParameters
Abstract converter rule class. Subclasses perform conversions between specific representation types...
virtual unsigned int GetConversionCost(vtkDataObject *sourceRepresentation=NULL, vtkDataObject *targetRepresentation=NULL)
std::map< std::string, std::pair< std::string, std::string > > ConversionParameterListType
Class that can convert between different representations of a segment.