Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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>
28 
29 // Segmentations includes
30 #include "vtkSlicerSegmentationsModuleMRMLExport.h"
31 
32 #include "vtkOrientedImageData.h"
33 
34 class vtkMRMLScene;
37 
46 class VTK_SLICER_SEGMENTATIONS_MODULE_MRML_EXPORT vtkMRMLSegmentEditorNode : public vtkMRMLNode
47 {
48 public:
49  enum
50  {
54  EffectParameterModified = 62200
55  };
56 
57  enum
58  {
60  PaintAllowedEverywhere=0,
71 
72  PaintAllowed_Last
73  };
74 
75  enum
76  {
78  OverwriteAllSegments=0,
83 
84  Overwrite_Last
85  };
86 
87 public:
88  static vtkMRMLSegmentEditorNode *New();
90  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
91 
93  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
94 
96  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
97 
99  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
100 
102  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
103 
105  virtual const char* GetNodeTagName() VTK_OVERRIDE { return "SegmentEditor"; }
106 
107  static int ConvertOverwriteModeFromString(const char* modeStr);
108  static const char* ConvertOverwriteModeToString(int mode);
109  static const char* ConvertMaskModeToString(int mode);
110  static int ConvertMaskModeFromString(const char* modeStr);
111 
112 public:
114  vtkMRMLScalarVolumeNode* GetMasterVolumeNode();
116  void SetAndObserveMasterVolumeNode(vtkMRMLScalarVolumeNode* node);
117 
119  vtkMRMLSegmentationNode* GetSegmentationNode();
121  void SetAndObserveSegmentationNode(vtkMRMLSegmentationNode* node);
122 
124  vtkGetStringMacro(SelectedSegmentID);
126  vtkSetStringMacro(SelectedSegmentID);
127 
129  vtkGetStringMacro(ActiveEffectName);
131  vtkSetStringMacro(ActiveEffectName);
132 
135  vtkSetMacro(MaskMode, int);
136  vtkGetMacro(MaskMode, int);
137 
140  vtkGetStringMacro(MaskSegmentID);
142  vtkSetStringMacro(MaskSegmentID);
143 
145  vtkBooleanMacro(MasterVolumeIntensityMask, bool);
146  vtkGetMacro(MasterVolumeIntensityMask, bool);
147  vtkSetMacro(MasterVolumeIntensityMask, bool);
148 
151  vtkSetVector2Macro(MasterVolumeIntensityMaskRange, double);
154  vtkGetVector2Macro(MasterVolumeIntensityMaskRange, double);
155 
158  vtkSetMacro(OverwriteMode, int);
159  vtkGetMacro(OverwriteMode, int);
160 
161 protected:
165  void operator=(const vtkMRMLSegmentEditorNode&);
166 
169 
172 
173  int MaskMode;
175 
177 
179  double MasterVolumeIntensityMaskRange[2];
180 };
181 
182 #endif // __vtkMRMLSegmentEditorNode_h
Modification is allowed outside all segments.
Modification is allowed only over the area covered by segment specified in MaskSegmentID.
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
Modification is allowed outside all visible segments.
Parameter set node for the segment editor widget.
Areas added to selected segment will be removed from all other segments. (overlap with all other segm...
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Modification is allowed inside all segments.
char * ActiveEffectName
Active effect name.
Areas added to selected segment will be removed from all visible segments. (no overlap with visible...
Modification is allowed inside all visible segments.
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...
char * SelectedSegmentID
Selected segment ID.