Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLSegmentEditorNode.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6 Queen's University, Kingston, ON, Canada. All Rights Reserved.
7
8 See COPYRIGHT.txt
9 or http://www.slicer.org/copyright/copyright.txt for details.
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18 and was supported through the Applied Cancer Research Unit program of Cancer Care
19 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20
21==============================================================================*/
22
23#ifndef __vtkMRMLSegmentEditorNode_h
24#define __vtkMRMLSegmentEditorNode_h
25
26// MRML includes
27#include <vtkMRMLNode.h>
29
30// Segmentations includes
31#include "vtkSlicerSegmentationsModuleMRMLExport.h"
32
34
35class vtkMRMLScene;
37
45class VTK_SLICER_SEGMENTATIONS_MODULE_MRML_EXPORT vtkMRMLSegmentEditorNode : public vtkMRMLNode
46{
47public:
48 enum
49 {
54 };
55
56 enum
57 {
64 // Insert valid types above this line
66 };
67
68public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
75
77 void ReadXMLAttributes(const char** atts) override;
78
80 void WriteXML(ostream& of, int indent) override;
81
83 void Copy(vtkMRMLNode* node) override;
84
86 const char* GetNodeTagName() override { return "SegmentEditor"; }
87
89
90 static int ConvertOverwriteModeFromString(const char* modeStr);
91 static const char* ConvertOverwriteModeToString(int mode);
93
94public:
96
101
103
107
109
113
115
117 vtkGetStringMacro(SelectedSegmentID);
118 vtkSetStringMacro(SelectedSegmentID);
120
122
123 vtkGetStringMacro(ActiveEffectName);
124 vtkSetStringMacro(ActiveEffectName);
126
128
133 vtkSetMacro(MaskMode, int);
134 vtkGetMacro(MaskMode, int);
136
138
141 vtkGetStringMacro(MaskSegmentID);
142 vtkSetStringMacro(MaskSegmentID);
144
146
147 vtkBooleanMacro(SourceVolumeIntensityMask, bool);
148 vtkGetMacro(SourceVolumeIntensityMask, bool);
149 vtkSetMacro(SourceVolumeIntensityMask, bool);
151
153
156 virtual void SetMasterVolumeIntensityMask(bool enable) { this->SetSourceVolumeIntensityMask(enable); }
159
161
165 vtkSetVector2Macro(SourceVolumeIntensityMaskRange, double);
166 vtkGetVector2Macro(SourceVolumeIntensityMaskRange, double);
168
170
171 virtual void SetMasterVolumeIntensityMaskRange(double _arg1, double _arg2)
172 {
173 vtkWarningMacro("vtkMRMLSegmentEditorNode::SetMasterVolumeIntensityMaskRange() method is deprecated, use SetSourceVolumeIntensityMaskRange method instead");
174 this->SetSourceVolumeIntensityMaskRange(_arg1, _arg2);
175 }
176 void SetMasterVolumeIntensityMaskRange(const double _arg[2])
177 {
178 vtkWarningMacro("vtkMRMLSegmentEditorNode::SetMasterVolumeIntensityMaskRange() method is deprecated, use SetSourceVolumeIntensityMaskRange method instead");
180 }
181
182 virtual double* GetMasterVolumeIntensityMaskRange() VTK_SIZEHINT(2)
183 {
184 vtkWarningMacro("vtkMRMLSegmentEditorNode::GetMasterVolumeIntensityMaskRange() method is deprecated, use GetSourceVolumeIntensityMaskRange method instead");
186 }
187
188 VTK_WRAPEXCLUDE
189 virtual void GetMasterVolumeIntensityMaskRange(double& _arg1, double& _arg2)
190 {
191 vtkWarningMacro("vtkMRMLSegmentEditorNode::GetMasterVolumeIntensityMaskRange() method is deprecated, use GetSourceVolumeIntensityMaskRange method instead");
192 this->GetSourceVolumeIntensityMaskRange(_arg1, _arg2);
193 }
194
195 VTK_WRAPEXCLUDE
196 virtual void GetMasterVolumeIntensityMaskRange(double _arg[2])
197 {
198 vtkWarningMacro("vtkMRMLSegmentEditorNode::GetMasterVolumeIntensityMaskRange() method is deprecated, use GetSourceVolumeIntensityMaskRange method instead");
200 }
201
202
204
206 vtkSetMacro(OverwriteMode, int);
207 vtkGetMacro(OverwriteMode, int);
209
210protected:
215
217 char* SelectedSegmentID{ nullptr };
218
220 char* ActiveEffectName{ nullptr };
221
223 char* MaskSegmentID{ nullptr };
224
226
229};
230
231#endif
MRML node for representing a volume (image stack).
A set of MRML Nodes that supports serialization and undo/redo.
vtkMRMLScalarVolumeNode * GetMasterVolumeNode()
Deprecated. Use GetSourceVolumeNode/SetAndObserveSourceVolumeNode methods instead.
virtual void SourceVolumeIntensityMaskOff()
const char * GetNodeTagName() override
Get unique node XML tag name (like Volume, Model)
vtkMRMLSegmentEditorNode(const vtkMRMLSegmentEditorNode &)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual void SetMasterVolumeIntensityMaskRange(double _arg1, double _arg2)
Deprecated. Use Get/SetSourceVolumeIntensityMaskRange method instead.
void SetAndObserveSourceVolumeNode(vtkMRMLScalarVolumeNode *node)
virtual void SetSourceVolumeIntensityMaskRange(double, double)
char * ActiveEffectName
Active effect name.
virtual double * GetSourceVolumeIntensityMaskRange()
virtual VTK_WRAPEXCLUDE void GetMasterVolumeIntensityMaskRange(double _arg[2])
static int ConvertOverwriteModeFromString(const char *modeStr)
Convert between constants IDs to/from string.
virtual VTK_WRAPEXCLUDE void GetMasterVolumeIntensityMaskRange(double &_arg1, double &_arg2)
vtkMRMLSegmentationNode * GetSegmentationNode()
Get/set segmentation node.
virtual void SourceVolumeIntensityMaskOn()
Restrict editable area to regions where source volume intensity is in the specified range.
virtual void MasterVolumeIntensityMaskOn()
Deprecated. Use Get/SetSourceVolumeIntensityMask method instead.
static const char * ConvertOverwriteModeToString(int mode)
void SetAndObserveSegmentationNode(vtkMRMLSegmentationNode *node)
void ReadXMLAttributes(const char **atts) override
Set node attributes from name/value pairs.
vtkMRMLNode * CreateNodeInstance() override
Create a new node of this type.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual bool GetSourceVolumeIntensityMask()
void SetMasterVolumeIntensityMaskRange(const double _arg[2])
static vtkMRMLSegmentEditorNode * New()
virtual void SetMasterVolumeIntensityMask(bool enable)
virtual double * GetMasterVolumeIntensityMaskRange() VTK_SIZEHINT(2)
void operator=(const vtkMRMLSegmentEditorNode &)
char * SelectedSegmentID
Selected segment ID.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
~vtkMRMLSegmentEditorNode() override
virtual void SetSourceVolumeIntensityMask(bool)
void SetAndObserveMasterVolumeNode(vtkMRMLScalarVolumeNode *node)
vtkMRMLScalarVolumeNode * GetSourceVolumeNode()
@ OverwriteAllSegments
Areas added to selected segment will be removed from all other segments. (no overlap)
@ OverwriteNone
Areas added to selected segment will not be removed from any segments. (overlap with all other segmen...
@ OverwriteVisibleSegments
Areas added to selected segment will be removed from all visible segments. (no overlap with visible,...
MRML node containing segmentations.
@ EditAllowedEverywhere
Modification is allowed everywhere.