Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLSliceCompositeNode.h
Go to the documentation of this file.
1/*=auto=========================================================================
2
3 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Program: 3D Slicer
9 Module: $RCSfile: vtkMRMLSliceCompositeNode.h,v $
10 Date: $Date: 2006/03/19 17:12:29 $
11 Version: $Revision: 1.3 $
12
13=========================================================================auto=*/
14
15#ifndef __vtkMRMLSliceCompositeNode_h
16#define __vtkMRMLSliceCompositeNode_h
17
18#include "vtkMRMLNode.h"
19
23
28class VTK_MRML_EXPORT vtkMRMLSliceCompositeNode : public vtkMRMLNode
29{
30public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
38 void ReadXMLAttributes(const char** atts) override;
39
41 void WriteXML(ostream& of, int indent) override;
42
46
48 const char* GetNodeTagName() override { return "SliceComposite"; }
49
53 const char* GetBackgroundVolumeID();
54 void SetBackgroundVolumeID(const char* id);
55 void SetReferenceBackgroundVolumeID(const char* id) { this->SetBackgroundVolumeID(id); }
57
61 const char* GetForegroundVolumeID();
62 void SetForegroundVolumeID(const char* id);
63 void SetReferenceForegroundVolumeID(const char* id) { this->SetForegroundVolumeID(id); }
65
69 const char* GetLabelVolumeID();
70 void SetLabelVolumeID(const char* id);
71 void SetReferenceLabelVolumeID(const char* id) { this->SetLabelVolumeID(id); }
73
74 enum
75 {
80 Layer_Last // must be last
81 };
82
84
88 void SetNthLayerVolume(int layerIndex, vtkMRMLVolumeNode* volumeNode);
90
93 const char* GetNthLayerVolumeID(int layerIndex);
94 void SetNthLayerVolumeID(int layerIndex, const char* volumeNodeID);
96
100 vtkGetMacro(Compositing, int);
101 vtkSetMacro(Compositing, int);
103
107 vtkGetMacro(ClipToBackgroundVolume, bool);
108 vtkSetMacro(ClipToBackgroundVolume, bool);
110
114 double GetNthLayerOpacity(int layerIndex);
115 void SetNthLayerOpacity(int layerIndex, double value);
117
123 void SetForegroundOpacity(double value);
125
131 void SetLabelOpacity(double value);
133
136 vtkGetMacro(LinkedControl, int);
137 vtkSetMacro(LinkedControl, int);
138 vtkBooleanMacro(LinkedControl, int);
140
144 vtkGetMacro(HotLinkedControl, int);
145 vtkSetMacro(HotLinkedControl, int);
146 vtkBooleanMacro(HotLinkedControl, int);
148
151 vtkGetMacro(FiducialVisibility, int);
152 vtkSetMacro(FiducialVisibility, int);
153 vtkGetMacro(FiducialLabelVisibility, int);
154 vtkSetMacro(FiducialLabelVisibility, int);
156
162 void SetSliceIntersectionVisibility(int visibility);
164
169 vtkSetMacro(DoPropagateVolumeSelection, bool);
170 vtkGetMacro(DoPropagateVolumeSelection, bool);
172
180 void SetLayoutName(const char* layoutName) { this->SetSingletonTag(layoutName); }
181 char* GetLayoutName() { return this->GetSingletonTag(); }
183
185 enum
186 {
187 Alpha = 0,
191 };
192
199 void SetInteracting(int);
200 vtkGetMacro(Interacting, int);
201 vtkBooleanMacro(Interacting, int);
203
222
229 void SetInteractionFlags(unsigned int);
230 vtkGetMacro(InteractionFlags, unsigned int);
232
239 void SetInteractionFlagsModifier(unsigned int);
240 vtkGetMacro(InteractionFlagsModifier, unsigned int);
242
247
248protected:
253
254 // Helper functions for deprecated SetSliceIntersectionVisibility/GetSliceIntersectionVisibility methods.
257
258 // Cached value of last found displayable node (it is expensive to determine it)
259 vtkWeakPointer<vtkMRMLSliceDisplayNode> LastFoundSliceDisplayNode;
260
261 std::vector<double> LayerOpacities = {
262 1.0, // Layer N (Background)
263 0.0, // Layer N (Foreground) over layer N-1 (Background): Start by showing only the background volume
264 1.0, // Layer N (Label) over layer N-1 (Foreground): Show the label if there is one
265 };
266
268
270
273
276
278
279 int Interacting{ 0 };
280 unsigned int InteractionFlags{ 0 };
281 unsigned int InteractionFlagsModifier{ (unsigned int)-1 };
282};
283
284#endif
MRML node to represent a 3D surface model.
virtual char * GetSingletonTag()
virtual void SetSingletonTag(const char *)
Tag that make this node a singleton in the scene.
vtkWeakPointer< vtkMRMLSliceDisplayNode > LastFoundSliceDisplayNode
double GetNthLayerOpacity(int layerIndex)
void SetNthLayerVolume(int layerIndex, vtkMRMLVolumeNode *volumeNode)
void SetLayoutName(const char *layoutName)
void SetReferenceForegroundVolumeID(const char *id)
~vtkMRMLSliceCompositeNode() override
void SetInteractionFlagsModifier(unsigned int)
vtkMRMLVolumeNode * GetNthLayerVolume(int layerIndex)
void SetForegroundVolumeID(const char *id)
void PrintSelf(ostream &os, vtkIndent indent) override
void ReadXMLAttributes(const char **atts) override
Set node attributes.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
static vtkMRMLSliceCompositeNode * New()
std::string GetCompositeNodeIDFromSliceModelNode(vtkMRMLModelNode *sliceModelNode)
vtkMRMLCopyContentMacro(vtkMRMLSliceCompositeNode)
void operator=(const vtkMRMLSliceCompositeNode &)
void SetForegroundOpacity(double value)
vtkMRMLSliceDisplayNode * GetSliceDisplayNode()
void SetReferenceLabelVolumeID(const char *id)
void SetReferenceBackgroundVolumeID(const char *id)
const char * GetForegroundVolumeID()
void SetLabelOpacity(double value)
const char * GetLabelVolumeID()
const char * GetNthLayerVolumeID(int layerIndex)
void SetSliceIntersectionVisibility(int visibility)
void SetLabelVolumeID(const char *id)
void SetInteractionFlags(unsigned int)
void SetNthLayerVolumeID(int layerIndex, const char *volumeNodeID)
void SetBackgroundVolumeID(const char *id)
const char * GetBackgroundVolumeID()
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void SetNthLayerOpacity(int layerIndex, double value)
vtkMRMLSliceCompositeNode(const vtkMRMLSliceCompositeNode &)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
MRML node to store display properties of slice nodes.
MRML node for representing a volume (image stack).