Slicer  4.8
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

void AddRepresentation (std::string type, vtkDataObject *representation)
 Add representation. More...
 
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 ()
 
void GetContainedRepresentationNames (std::vector< std::string > &representationNames)
 Get representation names present in this segment in an output string vector. More...
 
virtual char * GetName ()
 
virtual bool GetNameAutoGenerated ()
 
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) VTK_OVERRIDE
 
virtual void ReadXMLAttributes (const char **atts)
 Set attributes from name/value pairs. More...
 
void RemoveAllRepresentations (std::string exceptionRepresentationName="")
 
void RemoveRepresentation (std::string name)
 Remove representation of given type. More...
 
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 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

void operator= (const vtkSegment &)
 
 vtkSegment ()
 
 ~vtkSegment ()
 

Protected Attributes

double Color [3]
 
bool ColorAutoGenerated
 Flag indicating whether color was automatically generated. False after user manually overrides. True by default. More...
 
char * Name
 
bool NameAutoGenerated
 Flag indicating whether name was automatically generated. False after user manually overrides. True by default. More...
 
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 55 of file vtkSegment.h.

Constructor & Destructor Documentation

◆ vtkSegment()

vtkSegment::vtkSegment ( )
protected

◆ ~vtkSegment()

vtkSegment::~vtkSegment ( )
protected

Member Function Documentation

◆ AddRepresentation()

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

Add representation.

◆ 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

◆ 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

◆ GetContainedRepresentationNames()

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

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

◆ GetName()

virtual char* vtkSegment::GetName ( )
virtual

◆ GetNameAutoGenerated()

virtual bool vtkSegment::GetNameAutoGenerated ( )
virtual

◆ 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, NULL 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

◆ operator=()

void vtkSegment::operator= ( const vtkSegment )
protected

◆ PrintSelf()

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

◆ 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()

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

Remove representation of given type.

◆ 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  ,
double  ,
double   
)
virtual

◆ SetColor() [2/2]

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

◆ SetColorAutoGenerated()

virtual void vtkSegment::SetColorAutoGenerated ( bool  )
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

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

Definition at line 143 of file vtkSegment.h.

◆ ColorAutoGenerated

bool vtkSegment::ColorAutoGenerated
protected

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

Definition at line 151 of file vtkSegment.h.

◆ Name

char* vtkSegment::Name
protected

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

Definition at line 138 of file vtkSegment.h.

◆ NameAutoGenerated

bool vtkSegment::NameAutoGenerated
protected

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

Definition at line 149 of file vtkSegment.h.

◆ Representations

RepresentationMap vtkSegment::Representations
protected

Stored representations. Map from type string to data object.

Definition at line 134 of file vtkSegment.h.

◆ SEGMENT_COLOR_INVALID

const double vtkSegment::SEGMENT_COLOR_INVALID[3]
static

Definition at line 50 of file vtkSegment.h.

◆ Tags

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

Tags (for grouping and selection)

Definition at line 146 of file vtkSegment.h.


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