23#ifndef __vtkMRMLSegmentationDisplayNode_h
24#define __vtkMRMLSegmentationDisplayNode_h
77 for (
int i = 0; i < 3; ++i)
333 void GetSegmentIDs(std::vector<std::string>& segmentIDs,
bool visibleSegmentsOnly);
MRML node to represent discrete color information.
bool GetSegmentVisibility3D(std::string segmentID)
bool GetSegmentVisibility2DOutline(std::string segmentID)
void RemoveSegmentDisplayProperties(std::string segmentID)
Remove segment display properties.
void SetSegmentOpacity(std::string segmentID, double opacity)
Set all three types of segment opacity by segment ID.
static const double SEGMENT_COLOR_NO_OVERRIDE
void SetSegmentVisibility3D(std::string segmentID, bool visible)
Set segment 3D visibility by segment ID. Convenience function for python compatibility.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void SetSegmentOverrideColor(std::string segmentID, vtkVector3d overrideColor)
Set segment override color by segment ID.
void SetSegmentOpacity2DOutline(std::string segmentID, double opacity)
Set segment 2D outline opacity by segment ID. Convenience function for python compatibility.
double GetSegmentOpacity3D(std::string segmentID)
bool GetSegmentColor(std::string segmentID, double *color)
Get segment color by segment ID. If overridden then the override color is returned.
bool CalculateAutoOpacitiesForSegments()
vtkMTimeType SegmentListUpdateTime
For checking if cached segment list in SegmentationDisplayProperties has to be updated.
double ClippingCapOpacity
SegmentDisplayPropertiesMap SegmentationDisplayProperties
void SetSegmentDisplayProperties(std::string segmentID, SegmentDisplayProperties &properties)
Set segment display properties.
void ClearSegmentDisplayProperties()
Clear segment display properties.
vtkSegmentation * SegmentListUpdateSource
void SetSegmentOpacity2DFill(std::string segmentID, double opacity)
Set segment 2D fill opacity by segment ID. Convenience function for python compatibility.
double GetSegmentOpacity2DFill(std::string segmentID)
std::vector< std::string > GetVisibleSegmentIDs()
Get all visible segment IDs.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
vtkVector3d GetSegmentOverrideColor(std::string segmentID)
friend class vtkMRMLSegmentationNode
void operator=(const vtkMRMLSegmentationDisplayNode &)
vtkVector3d GetSegmentColor(std::string segmentID)
bool GetSegmentPickable(std::string segmentID)
static vtkMRMLSegmentationDisplayNode * New()
void SetAllSegmentsOpacity2DFill(double opacity, bool changeVisibleSegmentsOnly=false)
void GenerateSegmentColor(double &r, double &g, double &b)
unsigned int NumberOfGeneratedColors
void SetAllSegmentsPickable(bool pickable, bool changeVisibleSegmentsOnly=false)
void GenerateSegmentColor(double color[3], int colorNumber=0)
double GetSegmentOpacity2DOutline(std::string segmentID)
void SetAllSegmentsOpacity2DOutline(double opacity, bool changeVisibleSegmentsOnly=false)
vtkMRMLSegmentationDisplayNode()
bool GetSegmentDisplayProperties(std::string segmentID, SegmentDisplayProperties &properties)
void GetVisibleSegmentIDs(std::vector< std::string > &segmentIDs)
Get all visible segment IDs.
void SetSegmentColorGeneratorSourceColorNodeID(const char *colorNodeID)
vtkMRMLSegmentationDisplayNode(const vtkMRMLSegmentationDisplayNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
std::string GetDisplayRepresentationName2D()
bool GetSegmentVisibility(std::string segmentID)
void SetAllSegmentsVisibility3D(bool visible, bool changeVisibleSegmentsOnly=false)
void GetVisibleSegmentIDs(vtkStringArray *segmentIDs)
Get all visible segment IDs.
bool RemoveUnusedDisplayProperties
bool GetSegmentVisibility2DFill(std::string segmentID)
void SetAllSegmentsVisibility2DFill(bool visible, bool changeVisibleSegmentsOnly=false)
void GetPolyDataRepresentationNames(std::set< std::string > &representationNames)
Collect representation names that are stored as poly data.
void UnsetSegmentOverrideColor(std::string segmentID)
Unset segment override color (default segment color will be used for display instead).
void SetSegmentVisibility2DFill(std::string segmentID, bool visible)
Set segment 2D fill visibility by segment ID. Convenience function for python compatibility.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void SetSegmentPickable(std::string segmentID, bool pickable)
Set segment 2D pickability by segment ID. Convenience function for python compatibility.
void SetSegmentOpacity3D(std::string segmentID, double opacity)
Set segment 3D opacity by segment ID. Convenience function for python compatibility.
vtkMRMLCopyContentMacro(vtkMRMLSegmentationDisplayNode)
void SetAllSegmentsVisibility(bool visible)
std::map< std::string, SegmentDisplayProperties > SegmentDisplayPropertiesMap
void ReadXMLAttributes(const char **atts) override
Set node attributes from name/value pairs.
void SetSegmentDisplayPropertiesToDefault(const std::string &segmentId)
Set segment display properties to default.
double Opacity2DFill
2D fill opacity for the whole segmentation
double Opacity3D
3D opacity for the whole segmentation
const char * GetSegmentColorGeneratorSourceColorNodeID()
double Opacity2DOutline
2D outline opacity for the whole segmentation
void GetSegmentIDs(std::vector< std::string > &segmentIDs, bool visibleSegmentsOnly)
Convenience function for getting all segment IDs.
char * PreferredDisplayRepresentationName3D
void UpdateSegmentList(bool removeUnusedDisplayProperties)
void SetAllSegmentsOpacity(double opacity, bool changeVisibleSegmentsOnly=false)
bool GetSegmentColor(std::string segmentID, double &r, double &g, double &b)
Get segment color by segment ID. If overridden then the override color is returned.
void SetSegmentVisibility(std::string segmentID, bool visible)
Set overall segment visibility by segment ID. Convenience function for python compatibility.
std::string GetDisplayRepresentationName3D()
void SetAllSegmentsOpacity3D(double opacity, bool changeVisibleSegmentsOnly=false)
void SetSegmentOverrideColor(std::string segmentID, double r, double g, double b)
char * PreferredDisplayRepresentationName2D
void SetAllSegmentsVisibility2DOutline(bool visible, bool changeVisibleSegmentsOnly=false)
void SetSegmentVisibility2DOutline(std::string segmentID, bool visible)
Set segment 2D outline visibility by segment ID. Convenience function for python compatibility.
~vtkMRMLSegmentationDisplayNode() override
This class encapsulates a segmentation that can contain multiple segments and multiple representation...
Display properties per segment.
bool Pickable
Pickable by interactions flag. If true, then the point under the mouse on the segment surfaces in the...
SegmentDisplayProperties()
bool operator==(const SegmentDisplayProperties &rhs) const