21 #ifndef __vtkSegment_h 22 #define __vtkSegment_h 25 #include <vtkObject.h> 26 #include <vtkSmartPointer.h> 27 #include <vtkDataObject.h> 34 #include "vtkSegmentationCoreConfigure.h" 45 class vtkSegmentationCore_EXPORT
vtkSegment :
public vtkObject
47 typedef std::map<std::string, vtkSmartPointer<vtkDataObject> > RepresentationMap;
50 static const double SEGMENT_COLOR_INVALID[3];
52 static const char* GetTerminologyEntryTagName();
56 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
59 virtual void ReadXMLAttributes(
const char** atts);
62 void WriteXML(ostream& of,
int nIndent);
68 virtual void DeepCopyMetadata(
vtkSegment* source);
72 virtual void GetBounds(
double bounds[6]);
78 vtkDataObject* GetRepresentation(std::string name);
82 bool AddRepresentation(std::string type, vtkDataObject* representation);
86 bool RemoveRepresentation(std::string name);
91 void RemoveAllRepresentations(std::string exceptionRepresentationName=
"");
94 void SetTag(std::string tag, std::string value);
96 void SetTag(std::string tag,
int value);
99 void RemoveTag(std::string tag);
105 bool GetTag(std::string tag, std::string &value);
107 bool HasTag(std::string tag);
109 void GetTags(std::map<std::string,std::string> &tags);
112 void GetContainedRepresentationNames(std::vector<std::string>& representationNames);
115 vtkGetStringMacro(Name);
116 vtkSetStringMacro(Name);
118 vtkGetVector3Macro(Color,
double);
119 vtkSetVector3Macro(Color,
double);
121 vtkGetMacro(NameAutoGenerated,
bool);
122 vtkSetMacro(NameAutoGenerated,
bool);
123 vtkBooleanMacro(NameAutoGenerated,
bool);
125 vtkGetMacro(ColorAutoGenerated,
bool);
126 vtkSetMacro(ColorAutoGenerated,
bool);
127 vtkBooleanMacro(ColorAutoGenerated,
bool);
148 std::map<std::string,std::string>
Tags;
156 #endif // __vtkSegment_h std::map< std::string, std::string > Tags
Tags (for grouping and selection)
This class encapsulates a segment that is part of a segmentation.
bool NameAutoGenerated
Flag indicating whether name was automatically generated. False after user manually overrides...
RepresentationMap Representations
Stored representations. Map from type string to data object.
bool ColorAutoGenerated
Flag indicating whether color was automatically generated. False after user manually overrides...