Slicer 5.4
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
80 vtkGetMacro (ForegroundOpacity, double);
81 vtkSetMacro (ForegroundOpacity, double);
82
87 vtkGetMacro (LabelOpacity, double);
88 vtkSetMacro (LabelOpacity, double);
89
92 vtkGetMacro (LinkedControl, int );
93 vtkSetMacro (LinkedControl, int );
94 vtkBooleanMacro(LinkedControl, int);
95
99 vtkGetMacro (HotLinkedControl, int );
100 vtkSetMacro (HotLinkedControl, int );
101 vtkBooleanMacro(HotLinkedControl, int);
102
105 vtkGetMacro (FiducialVisibility, int );
106 vtkSetMacro (FiducialVisibility, int );
107 vtkGetMacro (FiducialLabelVisibility, int );
108 vtkSetMacro (FiducialLabelVisibility, int );
109
115 void SetSliceIntersectionVisibility(int visibility);
116
121 vtkSetMacro (DoPropagateVolumeSelection, bool );
122 vtkGetMacro (DoPropagateVolumeSelection, bool );
123
131 void SetLayoutName(const char *layoutName) {
132 this->SetSingletonTag(layoutName);
133 }
135 return this->GetSingletonTag();
136 }
137
139 enum
140 {
141 Alpha = 0,
144 Subtract
145 };
146
152 void SetInteracting(int);
153 vtkGetMacro(Interacting, int);
154 vtkBooleanMacro(Interacting, int);
155
165 {
166 None = 0,
167 ForegroundVolumeFlag = 1,
168 BackgroundVolumeFlag = 2,
169 LabelVolumeFlag = 4,
170 LabelOpacityFlag = 8,
171 ForegroundOpacityFlag = 16
172 // Next one needs to be 32
173 };
174
180 void SetInteractionFlags(unsigned int);
181 vtkGetMacro(InteractionFlags, unsigned int);
182
188 void SetInteractionFlagsModifier(unsigned int);
189 vtkGetMacro(InteractionFlagsModifier, unsigned int);
190
195
196protected:
197
202
203 // Helper functions for deprecated SetSliceIntersectionVisibility/GetSliceIntersectionVisibility methods.
206
207 // Cached value of last found displayable node (it is expensive to determine it)
208 vtkWeakPointer<vtkMRMLSliceDisplayNode> LastFoundSliceDisplayNode;
209
210 // start by showing only the background volume
211 double ForegroundOpacity{ 0.0 };
212
213 int Compositing{ Alpha };
214
215 // Show the label if there is one
216 double LabelOpacity{ 1.0 };
217 int LinkedControl{ 0 };
218 int HotLinkedControl{ 0 };
219
220 int FiducialVisibility{ 1 };
221 int FiducialLabelVisibility{ 1 };
222
223 bool DoPropagateVolumeSelection{ true };
224
225 int Interacting{ 0 };
226 unsigned int InteractionFlags{ 0 };
227 unsigned int InteractionFlagsModifier{ (unsigned int)-1 };
228};
229
230#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.