Slicer 5.8
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
22
27class VTK_MRML_EXPORT vtkMRMLSliceCompositeNode : public vtkMRMLNode
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
35
38 void ReadXMLAttributes( const char** atts) override;
39
42 void WriteXML(ostream& of, int indent) override;
43
47
50 const char* GetNodeTagName() override {return "SliceComposite";}
51
54 const char* GetBackgroundVolumeID();
55 void SetBackgroundVolumeID(const char* id);
56 void SetReferenceBackgroundVolumeID(const char *id) { this->SetBackgroundVolumeID(id); }
57
60 const char* GetForegroundVolumeID();
61 void SetForegroundVolumeID(const char* id);
62 void SetReferenceForegroundVolumeID(const char *id) { this->SetForegroundVolumeID(id); }
63
66 const char* GetLabelVolumeID();
67 void SetLabelVolumeID(const char* id);
68 void SetReferenceLabelVolumeID(const char *id) { this->SetLabelVolumeID(id); }
69
73 vtkGetMacro (Compositing, int);
74 vtkSetMacro (Compositing, int);
75
79 vtkGetMacro (ClipToBackgroundVolume, bool);
80 vtkSetMacro (ClipToBackgroundVolume, bool);
81
86 vtkGetMacro (ForegroundOpacity, double);
87 vtkSetMacro (ForegroundOpacity, double);
88
93 vtkGetMacro (LabelOpacity, double);
94 vtkSetMacro (LabelOpacity, double);
95
98 vtkGetMacro (LinkedControl, int );
99 vtkSetMacro (LinkedControl, int );
100 vtkBooleanMacro(LinkedControl, int);
101
105 vtkGetMacro (HotLinkedControl, int );
106 vtkSetMacro (HotLinkedControl, int );
107 vtkBooleanMacro(HotLinkedControl, int);
108
111 vtkGetMacro (FiducialVisibility, int );
112 vtkSetMacro (FiducialVisibility, int );
113 vtkGetMacro (FiducialLabelVisibility, int );
114 vtkSetMacro (FiducialLabelVisibility, int );
115
121 void SetSliceIntersectionVisibility(int visibility);
122
127 vtkSetMacro (DoPropagateVolumeSelection, bool );
128 vtkGetMacro (DoPropagateVolumeSelection, bool );
129
137 void SetLayoutName(const char *layoutName) {
138 this->SetSingletonTag(layoutName);
139 }
141 return this->GetSingletonTag();
142 }
143
145 enum
146 {
147 Alpha = 0,
150 Subtract
151 };
152
158 void SetInteracting(int);
159 vtkGetMacro(Interacting, int);
160 vtkBooleanMacro(Interacting, int);
161
171 {
172 None = 0,
173 ForegroundVolumeFlag = 1,
174 BackgroundVolumeFlag = 2,
175 LabelVolumeFlag = 4,
176 LabelOpacityFlag = 8,
177 ForegroundOpacityFlag = 16
178 // Next one needs to be 32
179 };
180
186 void SetInteractionFlags(unsigned int);
187 vtkGetMacro(InteractionFlags, unsigned int);
188
194 void SetInteractionFlagsModifier(unsigned int);
195 vtkGetMacro(InteractionFlagsModifier, unsigned int);
196
201
202protected:
203
208
209 // Helper functions for deprecated SetSliceIntersectionVisibility/GetSliceIntersectionVisibility methods.
212
213 // Cached value of last found displayable node (it is expensive to determine it)
214 vtkWeakPointer<vtkMRMLSliceDisplayNode> LastFoundSliceDisplayNode;
215
216 // start by showing only the background volume
217 double ForegroundOpacity{ 0.0 };
218
219 int Compositing{ Alpha };
220
221 bool ClipToBackgroundVolume{ true };
222
223 // Show the label if there is one
224 double LabelOpacity{ 1.0 };
225 int LinkedControl{ 0 };
226 int HotLinkedControl{ 0 };
227
228 int FiducialVisibility{ 1 };
229 int FiducialLabelVisibility{ 1 };
230
231 bool DoPropagateVolumeSelection{ true };
232
233 int Interacting{ 0 };
234 unsigned int InteractionFlags{ 0 };
235 unsigned int InteractionFlagsModifier{ (unsigned int)-1 };
236};
237
238#endif
MRML node to represent a 3D surface model.
Abstract Superclass for all specific types of MRML nodes.
MRML node for storing a slice through RAS space.
vtkWeakPointer< vtkMRMLSliceDisplayNode > LastFoundSliceDisplayNode
void SetLayoutName(const char *layoutName)
void SetReferenceForegroundVolumeID(const char *id)
~vtkMRMLSliceCompositeNode() override
void SetInteractionFlagsModifier(unsigned int)
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 &)
vtkMRMLSliceDisplayNode * GetSliceDisplayNode()
void SetReferenceLabelVolumeID(const char *id)
void SetReferenceBackgroundVolumeID(const char *id)
const char * GetForegroundVolumeID()
the ID of a MRMLVolumeNode
const char * GetLabelVolumeID()
the ID of a MRMLVolumeNode
void SetSliceIntersectionVisibility(int visibility)
void SetLabelVolumeID(const char *id)
void SetInteractionFlags(unsigned int)
void SetBackgroundVolumeID(const char *id)
const char * GetBackgroundVolumeID()
the ID of a MRMLVolumeNode
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
vtkMRMLSliceCompositeNode(const vtkMRMLSliceCompositeNode &)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
MRML node to store display properties of slice nodes.