Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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) {
181 this->SetSingletonTag(layoutName);
182 }
184 return this->GetSingletonTag();
185 }
186
187
189 enum
190 {
191 Alpha = 0,
195 };
196
203 void SetInteracting(int);
204 vtkGetMacro(Interacting, int);
205 vtkBooleanMacro(Interacting, int);
207
226
233 void SetInteractionFlags(unsigned int);
234 vtkGetMacro(InteractionFlags, unsigned int);
236
243 void SetInteractionFlagsModifier(unsigned int);
244 vtkGetMacro(InteractionFlagsModifier, unsigned int);
246
251
252protected:
253
258
259 // Helper functions for deprecated SetSliceIntersectionVisibility/GetSliceIntersectionVisibility methods.
262
263 // Cached value of last found displayable node (it is expensive to determine it)
264 vtkWeakPointer<vtkMRMLSliceDisplayNode> LastFoundSliceDisplayNode;
265
266 std::vector<double> LayerOpacities = {
267 1.0, // Layer N (Background)
268 0.0, // Layer N (Foreground) over layer N-1 (Background): Start by showing only the background volume
269 1.0, // Layer N (Label) over layer N-1 (Foreground): Show the label if there is one
270 };
271
273
275
278
281
283
284 int Interacting{ 0 };
285 unsigned int InteractionFlags{ 0 };
286 unsigned int InteractionFlagsModifier{ (unsigned int)-1 };
287};
288
289#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).