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;
51 static const double SEGMENT_COLOR_INVALID[3];
53 static const char* GetTerminologyEntryTagName();
57 void PrintSelf(ostream& os, vtkIndent indent)
override;
60 virtual void ReadXMLAttributes(
const char** atts);
63 void WriteXML(ostream& of,
int nIndent);
69 virtual void DeepCopyMetadata(
vtkSegment* source);
73 virtual void GetBounds(
double bounds[6]);
79 vtkDataObject* GetRepresentation(std::string name);
83 bool AddRepresentation(std::string type, vtkDataObject* representation);
87 bool RemoveRepresentation(std::string name);
92 void RemoveAllRepresentations(std::string exceptionRepresentationName=
"");
95 void SetTag(std::string tag, std::string value);
97 void SetTag(std::string tag,
int value);
100 void RemoveTag(std::string tag);
106 bool GetTag(std::string tag, std::string &value);
108 bool HasTag(std::string tag);
110 void GetTags(std::map<std::string,std::string> &tags);
113 void GetContainedRepresentationNames(std::vector<std::string>& representationNames);
118 vtkGetStringMacro(Name);
119 vtkSetStringMacro(Name);
124 vtkGetVector3Macro(Color,
double);
125 vtkSetVector3Macro(Color,
double);
128 vtkGetMacro(NameAutoGenerated,
bool);
129 vtkSetMacro(NameAutoGenerated,
bool);
130 vtkBooleanMacro(NameAutoGenerated,
bool);
133 vtkGetMacro(ColorAutoGenerated,
bool);
134 vtkSetMacro(ColorAutoGenerated,
bool);
135 vtkBooleanMacro(ColorAutoGenerated,
bool);
138 vtkGetMacro(LabelValue,
int);
139 vtkSetMacro(LabelValue,
int);
151 std::map<std::string,std::string>
Tags;
161 #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.
RepresentationMap Representations
Stored representations. Map from type string to data object.