Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLMarkupsFiducialDisplayableManager2D.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 ==============================================================================*/
17 
18 #ifndef __vtkMRMLMarkupsFiducialDisplayableManager2D_h
19 #define __vtkMRMLMarkupsFiducialDisplayableManager2D_h
20 
21 // MarkupsModule includes
22 #include "vtkSlicerMarkupsModuleMRMLDisplayableManagerExport.h"
23 
24 // MarkupsModule/MRMLDisplayableManager includes
26 
28 class vtkSlicerViewerWidget;
30 class vtkTextWidget;
31 
33 class VTK_SLICER_MARKUPS_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT vtkMRMLMarkupsFiducialDisplayableManager2D :
35 {
36 public:
37 
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
43  virtual bool UpdateNthSeedPositionFromMRML(int n, vtkAbstractWidget *widget, vtkMRMLMarkupsNode *pointsNode) VTK_OVERRIDE;
44 
46  virtual bool UpdateNthMarkupPositionFromWidget(int n, vtkMRMLMarkupsNode* pointsNode, vtkAbstractWidget * widget) VTK_OVERRIDE;
47 
48 protected:
49 
50  vtkMRMLMarkupsFiducialDisplayableManager2D(){this->Focus="vtkMRMLMarkupsFiducialNode";}
52 
54  virtual void OnClickInRenderWindow(double x, double y, const char *associatedNodeID) VTK_OVERRIDE;
56  virtual vtkAbstractWidget * CreateWidget(vtkMRMLMarkupsNode* node) VTK_OVERRIDE;
58  virtual void OnMRMLMarkupsNodeMarkupAddedEvent(vtkMRMLMarkupsNode * markupsNode, int n) VTK_OVERRIDE;
60  virtual void OnMRMLMarkupsNodeNthMarkupModifiedEvent(vtkMRMLMarkupsNode * markupsNode, int n) VTK_OVERRIDE;
62  virtual void OnMRMLMarkupsNodeMarkupRemovedEvent(vtkMRMLMarkupsNode * markupsNode, int n) VTK_OVERRIDE;
63 
65  virtual void OnWidgetCreated(vtkAbstractWidget * widget, vtkMRMLMarkupsNode * node) VTK_OVERRIDE;
66 
68  void SetNthSeed(int n, vtkMRMLMarkupsFiducialNode* fiducialNode, vtkSeedWidget *seedWidget);
70  virtual void PropagateMRMLToWidget(vtkMRMLMarkupsNode* node, vtkAbstractWidget * widget) VTK_OVERRIDE;
71 
73  virtual void PropagateWidgetToMRML(vtkAbstractWidget * widget, vtkMRMLMarkupsNode* node) VTK_OVERRIDE;
74 
76  virtual void AdditionnalInitializeStep();
78  virtual void OnInteractorStyleEvent(int eventid) VTK_OVERRIDE;
79 
81  virtual void UpdatePosition(vtkAbstractWidget *widget, vtkMRMLNode *node) VTK_OVERRIDE;
82 
83  // Clean up when scene closes
84  virtual void OnMRMLSceneEndClose() VTK_OVERRIDE;
85 
86 private:
87 
89  void operator=(const vtkMRMLMarkupsFiducialDisplayableManager2D&);
90 
91 };
92 
93 #endif
virtual void OnMRMLSceneEndClose() VTK_OVERRIDE
MRML node to represent a fiducial markup Fiducial Markups nodes contain a list of fiducial points...
virtual bool UpdateNthSeedPositionFromMRML(int vtkNotUsed(n), vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLMarkupsNode *vtkNotUsed(markupsNode))
virtual void OnWidgetCreated(vtkAbstractWidget *widget, vtkMRMLMarkupsNode *node)
Gets called when widget was created.
MRML node to represent a list of markups Markups nodes contains a list of markups that each contain a...
virtual void UpdatePosition(vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLNode *vtkNotUsed(node))
Update just the position for the widget, implemented by subclasses.
virtual void OnMRMLMarkupsNodeMarkupAddedEvent(vtkMRMLMarkupsNode *vtkNotUsed(markupsNode), int vtkNotUsed(n))
Subclasses need to react to new markups being added to a markups node or modified.
virtual void PropagateWidgetToMRML(vtkAbstractWidget *widget, vtkMRMLMarkupsNode *node)
Propagate properties of widget to MRML node.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void OnMRMLMarkupsNodeNthMarkupModifiedEvent(vtkMRMLMarkupsNode *vtkNotUsed(node), int vtkNotUsed(n))
virtual void OnInteractorStyleEvent(int eventid) VTK_OVERRIDE
Respond to interactor style events.
virtual void OnClickInRenderWindow(double x, double y, const char *associatedNodeID=NULL)
Callback for click in RenderWindow.
virtual void OnMRMLMarkupsNodeMarkupRemovedEvent(vtkMRMLMarkupsNode *vtkNotUsed(markupsNode), int vtkNotUsed(n))
virtual bool UpdateNthMarkupPositionFromWidget(int vtkNotUsed(n), vtkMRMLMarkupsNode *vtkNotUsed(pointsNode), vtkAbstractWidget *vtkNotUsed(widget))
virtual vtkAbstractWidget * CreateWidget(vtkMRMLMarkupsNode *node)
Create a widget.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
static vtkMRMLMarkupsDisplayableManager2D * New()
virtual void PropagateMRMLToWidget(vtkMRMLMarkupsNode *node, vtkAbstractWidget *widget)
Propagate properties of MRML node to widget.