26#include <vtkSmartPointer.h>
27#include <vtkDataObject.h>
34#include "vtkSegmentationCoreConfigure.h"
44class vtkSegmentationCore_EXPORT
vtkSegment :
public vtkObject
46 typedef std::map<std::string, vtkSmartPointer<vtkDataObject> > RepresentationMap;
69 void PrintSelf(ostream& os, vtkIndent indent)
override;
107 void SetTag(std::string tag, std::string value);
118 bool GetTag(std::string tag, std::string &value);
122 void GetTags(std::map<std::string,std::string> &tags);
163 std::map<std::string,std::string>
Tags;
44class vtkSegmentationCore_EXPORT
vtkSegment :
public vtkObject {
…};
virtual void DeepCopyMetadata(vtkSegment *source)
Deep copy metadata (i.e., all data but representations) one segment into another.
void RemoveAllRepresentations(std::string exceptionRepresentationName="")
virtual void GetBounds(double bounds[6])
bool GetTag(std::string tag, std::string &value)
vtkDataObject * GetRepresentation(std::string name)
void PrintSelf(ostream &os, vtkIndent indent) override
bool AddRepresentation(std::string type, vtkDataObject *representation)
bool HasTag(std::string tag)
Determine if a tag is present.
bool RemoveRepresentation(std::string name)
void SetTag(std::string tag, std::string value)
Set/add tag.
std::map< std::string, std::string > Tags
Tags (for grouping and selection)
void SetTag(std::string tag, int value)
Set/add integer tag.
static const char * GetTerminologyEntryTagName()
Get tag name that stores terminology information (standard codes for describing the segment content).
virtual void ReadXMLAttributes(const char **atts)
Set attributes from name/value pairs.
void GetTags(std::map< std::string, std::string > &tags)
Get tags.
static vtkSegment * New()
void RemoveTag(std::string tag)
Remove tag.
RepresentationMap Representations
Stored representations. Map from type string to data object.
void GetContainedRepresentationNames(std::vector< std::string > &representationNames)
Get representation names present in this segment in an output string vector.
void SetTerminology(std::string terminologyEntry)
virtual void DeepCopy(vtkSegment *source)
Deep copy one segment into another.
static const double SEGMENT_COLOR_INVALID[3]
void WriteXML(ostream &of, int nIndent)
Write this object's information to a MRML file in XML format.
std::string GetTerminology()