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);
81 void AddRepresentation(std::string type, vtkDataObject* representation);
84 void RemoveRepresentation(std::string name);
89 void RemoveAllRepresentations(std::string exceptionRepresentationName=
"");
92 void SetTag(std::string tag, std::string value);
94 void SetTag(std::string tag,
int value);
97 void RemoveTag(std::string tag);
103 bool GetTag(std::string tag, std::string &value);
105 bool HasTag(std::string tag);
107 void GetTags(std::map<std::string,std::string> &tags);
110 void GetContainedRepresentationNames(std::vector<std::string>& representationNames);
113 vtkGetStringMacro(Name);
114 vtkSetStringMacro(Name);
116 vtkGetVector3Macro(Color,
double);
117 vtkSetVector3Macro(Color,
double);
119 vtkGetMacro(NameAutoGenerated,
bool);
120 vtkSetMacro(NameAutoGenerated,
bool);
121 vtkBooleanMacro(NameAutoGenerated,
bool);
123 vtkGetMacro(ColorAutoGenerated,
bool);
124 vtkSetMacro(ColorAutoGenerated,
bool);
125 vtkBooleanMacro(ColorAutoGenerated,
bool);
146 std::map<std::string,std::string>
Tags;
154 #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...