Slicer  4.10
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 
59  enum
60  {
62  PaintAllowedEverywhere=0,
74  PaintAllowed_Last
75  };
76 
77  enum
78  {
80  OverwriteAllSegments=0,
85 
86  Overwrite_Last
87  };
88 
89 public:
90  static vtkMRMLSegmentEditorNode *New();
92  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
93 
95  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
96 
98  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
99 
101  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
102 
104  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
105 
107  virtual const char* GetNodeTagName() VTK_OVERRIDE { return "SegmentEditor"; }
108 
109  static int ConvertOverwriteModeFromString(const char* modeStr);
110  static const char* ConvertOverwriteModeToString(int mode);
111  static const char* ConvertMaskModeToString(int mode);
112  static int ConvertMaskModeFromString(const char* modeStr);
113 
114 public:
116  vtkMRMLScalarVolumeNode* GetMasterVolumeNode();
118  void SetAndObserveMasterVolumeNode(vtkMRMLScalarVolumeNode* node);
119 
121  vtkMRMLSegmentationNode* GetSegmentationNode();
123  void SetAndObserveSegmentationNode(vtkMRMLSegmentationNode* node);
124 
126  vtkGetStringMacro(SelectedSegmentID);
128  vtkSetStringMacro(SelectedSegmentID);
129 
131  vtkGetStringMacro(ActiveEffectName);
133  vtkSetStringMacro(ActiveEffectName);
134 
137  vtkSetMacro(MaskMode, int);
138  vtkGetMacro(MaskMode, int);
139 
142  vtkGetStringMacro(MaskSegmentID);
144  vtkSetStringMacro(MaskSegmentID);
145 
147  vtkBooleanMacro(MasterVolumeIntensityMask, bool);
148  vtkGetMacro(MasterVolumeIntensityMask, bool);
149  vtkSetMacro(MasterVolumeIntensityMask, bool);
150 
153  vtkSetVector2Macro(MasterVolumeIntensityMaskRange, double);
156  vtkGetVector2Macro(MasterVolumeIntensityMaskRange, double);
157 
160  vtkSetMacro(OverwriteMode, int);
161  vtkGetMacro(OverwriteMode, int);
162 
163 protected:
167  void operator=(const vtkMRMLSegmentEditorNode&);
168 
171 
174 
175  int MaskMode;
177 
179 
181  double MasterVolumeIntensityMaskRange[2];
182 };
183 
184 #endif // __vtkMRMLSegmentEditorNode_h
Areas added to selected segment will be removed from all visible segments. (no overlap with visible...
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
Areas added to selected segment will be removed from all other segments. (overlap with all other segm...
Parameter set node for the segment editor widget.
Modification is allowed inside all visible segments.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
char * ActiveEffectName
Active effect name.
Modification is allowed outside all segments.
Modification is allowed inside all segments.
Modification is allowed outside all visible segments.
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
Modification is allowed only over the area covered by segment specified in MaskSegmentID.
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...
char * SelectedSegmentID
Selected segment ID.