Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
vtkSegment Class Reference

This class encapsulates a segment that is part of a segmentation. More...

#include <Libs/vtkSegmentationCore/vtkSegment.h>

Inheritance diagram for vtkSegment:
Inheritance graph
[legend]
Collaboration diagram for vtkSegment:
Collaboration graph
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

bool AddRepresentation (std::string type, vtkDataObject *representation)
 
virtual void ColorAutoGeneratedOff ()
 
virtual void ColorAutoGeneratedOn ()
 
virtual void DeepCopy (vtkSegment *source)
 Deep copy one segment into another. More...
 
virtual void DeepCopyMetadata (vtkSegment *source)
 Deep copy metadata (i.e., all data but representations) one segment into another. More...
 
virtual void GetBounds (double bounds[6])
 
virtual const char * GetClassName ()
 
virtual double * GetColor ()
 
virtual void GetColor (double &, double &, double &)
 
virtual void GetColor (double [3])
 
virtual bool GetColorAutoGenerated ()
 Flag indicating whether color was automatically generated. False after user manually overrides. True by default. More...
 
void GetContainedRepresentationNames (std::vector< std::string > &representationNames)
 Get representation names present in this segment in an output string vector. More...
 
virtual int GetLabelValue ()
 Value in the binary labelmap that is used to represent the segment. More...
 
virtual char * GetName ()
 
virtual bool GetNameAutoGenerated ()
 Flag indicating whether name was automatically generated. False after user manually overrides. True by default. More...
 
vtkDataObject * GetRepresentation (std::string name)
 
bool GetTag (std::string tag, std::string &value)
 
void GetTags (std::map< std::string, std::string > &tags)
 Get tags. More...
 
bool HasTag (std::string tag)
 Determine if a tag is present. More...
 
virtual int IsA (const char *type)
 
virtual void NameAutoGeneratedOff ()
 
virtual void NameAutoGeneratedOn ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void ReadXMLAttributes (const char **atts)
 Set attributes from name/value pairs. More...
 
void RemoveAllRepresentations (std::string exceptionRepresentationName="")
 
bool RemoveRepresentation (std::string name)
 
void RemoveTag (std::string tag)
 Remove tag. More...
 
virtual void SetColor (double [3])
 
virtual void SetColor (double, double, double)
 
virtual void SetColorAutoGenerated (bool)
 
virtual void SetLabelValue (int)
 
virtual void SetName (const char *)
 
virtual void SetNameAutoGenerated (bool)
 
void SetTag (std::string tag, std::string value)
 Set/add tag. More...
 
void SetTag (std::string tag, int value)
 Set/add integer tag. More...
 
void WriteXML (ostream &of, int nIndent)
 Write this object's information to a MRML file in XML format. More...
 

Static Public Member Functions

static const char * GetTerminologyEntryTagName ()
 
static int IsTypeOf (const char *type)
 
static vtkSegmentNew ()
 
static vtkSegmentSafeDownCast (vtkObject *o)
 

Static Public Attributes

static const double SEGMENT_COLOR_INVALID [3]
 

Protected Member Functions

 vtkSegment ()
 
 ~vtkSegment () override
 

Protected Attributes

double Color [3]
 
bool ColorAutoGenerated
 
int LabelValue
 
char * Name
 
bool NameAutoGenerated
 
RepresentationMap Representations
 Stored representations. Map from type string to data object. More...
 
std::map< std::string, std::string > Tags
 Tags (for grouping and selection) More...
 

Detailed Description

This class encapsulates a segment that is part of a segmentation.

A

See also
vtkSegmentation can contain multiple segments (this class) each of which represent one anatomical or other structure (in labelmap terms, a "label"). Each segmentation can contain the structure in multiple representations. Default representation types include Binary labelmap and Closed surface, but additional custom representations can be added (see description of
vtkSegmentation).

Definition at line 45 of file vtkSegment.h.

Member Typedef Documentation

◆ Superclass

typedef vtkObject vtkSegment::Superclass

Definition at line 56 of file vtkSegment.h.

Constructor & Destructor Documentation

◆ vtkSegment()

vtkSegment::vtkSegment ( )
protected

◆ ~vtkSegment()

vtkSegment::~vtkSegment ( )
overrideprotected

Member Function Documentation

◆ AddRepresentation()

bool vtkSegment::AddRepresentation ( std::string  type,
vtkDataObject *  representation 
)

Add representation

Returns
True if the representation is changed.

◆ ColorAutoGeneratedOff()

virtual void vtkSegment::ColorAutoGeneratedOff ( )
virtual

◆ ColorAutoGeneratedOn()

virtual void vtkSegment::ColorAutoGeneratedOn ( )
virtual

◆ DeepCopy()

virtual void vtkSegment::DeepCopy ( vtkSegment source)
virtual

Deep copy one segment into another.

◆ DeepCopyMetadata()

virtual void vtkSegment::DeepCopyMetadata ( vtkSegment source)
virtual

Deep copy metadata (i.e., all data but representations) one segment into another.

◆ GetBounds()

virtual void vtkSegment::GetBounds ( double  bounds[6])
virtual

Get bounding box in global RAS in the form (xmin,xmax, ymin,ymax, zmin,zmax). For image data bound is computed for the voxel corner points (not voxel center points).

◆ GetClassName()

virtual const char* vtkSegment::GetClassName ( )
virtual

◆ GetColor() [1/3]

virtual double* vtkSegment::GetColor ( )
virtual

Color The actual color the segment is shown in. Can be overridden in the display node to allow displaying segment in selected views in a different color

◆ GetColor() [2/3]

virtual void vtkSegment::GetColor ( double &  ,
double &  ,
double &   
)
virtual

◆ GetColor() [3/3]

virtual void vtkSegment::GetColor ( double  [3])
virtual

◆ GetColorAutoGenerated()

virtual bool vtkSegment::GetColorAutoGenerated ( )
virtual

Flag indicating whether color was automatically generated. False after user manually overrides. True by default.

◆ GetContainedRepresentationNames()

void vtkSegment::GetContainedRepresentationNames ( std::vector< std::string > &  representationNames)

Get representation names present in this segment in an output string vector.

◆ GetLabelValue()

virtual int vtkSegment::GetLabelValue ( )
virtual

Value in the binary labelmap that is used to represent the segment.

◆ GetName()

virtual char* vtkSegment::GetName ( )
virtual

Name (e.g. segment label in DICOM Segmentation Object) This is the default identifier of the segment within segmentation, so needs to be unique within a segmentation

◆ GetNameAutoGenerated()

virtual bool vtkSegment::GetNameAutoGenerated ( )
virtual

Flag indicating whether name was automatically generated. False after user manually overrides. True by default.

◆ GetRepresentation()

vtkDataObject* vtkSegment::GetRepresentation ( std::string  name)

Get representation of a given type. This class is not responsible for conversion, only storage!

Parameters
nameRepresentation name. Default representation names can be queried from
See also
vtkSegmentationConverter, for example by calling vtkSegmentationConverter::GetSegmentationBinaryLabelmapRepresentationName()
Returns
The specified representation object, nullptr if not present

◆ GetTag()

bool vtkSegment::GetTag ( std::string  tag,
std::string &  value 
)

Get tag

Parameters
tagName of requested tag
valueOutput argument for the value of the tag if found
Returns
True if tag is found, false otherwise

◆ GetTags()

void vtkSegment::GetTags ( std::map< std::string, std::string > &  tags)

Get tags.

◆ GetTerminologyEntryTagName()

static const char* vtkSegment::GetTerminologyEntryTagName ( )
static

◆ HasTag()

bool vtkSegment::HasTag ( std::string  tag)

Determine if a tag is present.

◆ IsA()

virtual int vtkSegment::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkSegment::IsTypeOf ( const char *  type)
static

◆ NameAutoGeneratedOff()

virtual void vtkSegment::NameAutoGeneratedOff ( )
virtual

◆ NameAutoGeneratedOn()

virtual void vtkSegment::NameAutoGeneratedOn ( )
virtual

◆ New()

static vtkSegment* vtkSegment::New ( )
static

◆ PrintSelf()

void vtkSegment::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ ReadXMLAttributes()

virtual void vtkSegment::ReadXMLAttributes ( const char **  atts)
virtual

Set attributes from name/value pairs.

◆ RemoveAllRepresentations()

void vtkSegment::RemoveAllRepresentations ( std::string  exceptionRepresentationName = "")

Remove all representations except one if specified. Fires only one Modified event

Parameters
exceptionRepresentationNameException name that will not be removed (e.g. invalidate non-master representations), empty by default

◆ RemoveRepresentation()

bool vtkSegment::RemoveRepresentation ( std::string  name)

Remove representation of given type.

Returns
True if there was a representation that was removed.

◆ RemoveTag()

void vtkSegment::RemoveTag ( std::string  tag)

Remove tag.

◆ SafeDownCast()

static vtkSegment* vtkSegment::SafeDownCast ( vtkObject *  o)
static

◆ SetColor() [1/2]

virtual void vtkSegment::SetColor ( double  [3])
virtual

◆ SetColor() [2/2]

virtual void vtkSegment::SetColor ( double  ,
double  ,
double   
)
virtual

◆ SetColorAutoGenerated()

virtual void vtkSegment::SetColorAutoGenerated ( bool  )
virtual

◆ SetLabelValue()

virtual void vtkSegment::SetLabelValue ( int  )
virtual

◆ SetName()

virtual void vtkSegment::SetName ( const char *  )
virtual

◆ SetNameAutoGenerated()

virtual void vtkSegment::SetNameAutoGenerated ( bool  )
virtual

◆ SetTag() [1/2]

void vtkSegment::SetTag ( std::string  tag,
std::string  value 
)

Set/add tag.

◆ SetTag() [2/2]

void vtkSegment::SetTag ( std::string  tag,
int  value 
)

Set/add integer tag.

◆ WriteXML()

void vtkSegment::WriteXML ( ostream &  of,
int  nIndent 
)

Write this object's information to a MRML file in XML format.

Member Data Documentation

◆ Color

double vtkSegment::Color[3]
protected

Definition at line 149 of file vtkSegment.h.

◆ ColorAutoGenerated

bool vtkSegment::ColorAutoGenerated
protected

Definition at line 153 of file vtkSegment.h.

◆ LabelValue

int vtkSegment::LabelValue
protected

Definition at line 154 of file vtkSegment.h.

◆ Name

char* vtkSegment::Name
protected

Definition at line 148 of file vtkSegment.h.

◆ NameAutoGenerated

bool vtkSegment::NameAutoGenerated
protected

Definition at line 152 of file vtkSegment.h.

◆ Representations

RepresentationMap vtkSegment::Representations
protected

Stored representations. Map from type string to data object.

Definition at line 147 of file vtkSegment.h.

◆ SEGMENT_COLOR_INVALID

const double vtkSegment::SEGMENT_COLOR_INVALID[3]
static

Definition at line 51 of file vtkSegment.h.

◆ Tags

std::map<std::string,std::string> vtkSegment::Tags
protected

Tags (for grouping and selection)

Definition at line 151 of file vtkSegment.h.


The documentation for this class was generated from the following file: