16 #ifndef __vtkMRMLAnnotationDisplayableManager_h 17 #define __vtkMRMLAnnotationDisplayableManager_h 20 #include "vtkSlicerAnnotationsModuleMRMLDisplayableManagerExport.h" 27 class vtkSlicerViewerWidget;
36 class vtkAbstractWidget;
37 class vtkHandleWidget;
41 class VTK_SLICER_ANNOTATIONS_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT
49 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
59 virtual bool Is2DDisplayableManager();
64 void RestrictDisplayCoordinatesToViewport(
double* displayCoordinates);
67 bool GetDisplayCoordinatesChanged(
double * displayCoordinates1,
double * displayCoordinates2);
70 bool GetWorldCoordinatesChanged(
double * worldCoordinates1,
double * worldCoordinates2);
73 void GetDisplayToWorldCoordinates(
double x,
double y,
double * worldCoordinates);
74 void GetDisplayToWorldCoordinates(
double * displayCoordinates,
double * worldCoordinates);
78 double *worldCoordinates,
double *localCoordinates);
84 vtkSetMacro(ScaleFactor2D,
double);
85 vtkGetMacro(ScaleFactor2D,
double);
89 bool IsInLightboxMode();
110 virtual void Create() VTK_OVERRIDE;
143 void SetAndObserveNodes();
146 void AddObserversToInteractionNode();
147 void RemoveObserversFromInteractionNode();
154 void AddObserversToSelectionNode();
155 void RemoveObserversFromSelectionNode();
158 virtual void OnMRMLAnnotationNodeModifiedEvent(
vtkMRMLNode* node);
159 virtual void OnMRMLAnnotationNodeTransformModifiedEvent(
vtkMRMLNode* node);
160 virtual void OnMRMLAnnotationNodeLockModifiedEvent(
vtkMRMLNode* node);
161 virtual void OnMRMLAnnotationDisplayNodeModifiedEvent(
vtkMRMLNode *node);
162 virtual void OnMRMLAnnotationControlPointModifiedEvent(
vtkMRMLNode *node);
170 void OnClickInRenderWindowGetCoordinates();
172 virtual void OnClickInRenderWindow(
double x,
double y,
const char *associatedNodeID = NULL);
183 virtual void PlaceSeed(
double x,
double y);
185 vtkHandleWidget * GetSeed(
int index);
196 void GetWorldToDisplayCoordinates(
double r,
double a,
double s,
double * displayCoordinates);
197 void GetWorldToDisplayCoordinates(
double * worldCoordinates,
double * displayCoordinates);
200 void GetDisplayToViewportCoordinates(
double x,
double y,
double * viewportCoordinates);
201 void GetDisplayToViewportCoordinates(
double *displayCoordinates,
double * viewportCoordinates);
215 bool IsCorrectDisplayableManager();
226 virtual bool IsManageable(
const char* nodeClassName);
238 vtkGetMacro(DisableInteractorStyleEventsProcessing,
int);
242 double LastClickWorldCoordinates[4];
250 int DisableInteractorStyleEventsProcessing;
253 double ScaleFactor2D;
Superclass for displayable manager classes.
virtual void RemoveMRMLObservers()
Remove MRML observers.
virtual void OnMRMLSceneEndClose()
virtual void SetParentTransformToWidget(vtkMRMLAnnotationNode *vtkNotUsed(node), vtkAbstractWidget *vtkNotUsed(widget))
Set mrml parent transform to widgets.
static vtkMRMLAbstractDisplayableManager * New()
vtkMRMLAnnotationClickCounter * m_ClickCounter
Counter for clicks in Render Window.
MRML node for storing a slice through RAS space.
virtual void OnMRMLDisplayableNodeModifiedEvent(vtkObject *caller)
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene) VTK_OVERRIDE
int m_Updating
Disable processing when updating is in progress.
A set of MRML Nodes that supports serialization and undo/redo.
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
virtual void OnMRMLSelectionNodeUnitModifiedEvent(vtkMRMLSelectionNode *)
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *)
virtual void UpdateFromMRML()
vtkMRMLAnnotationDisplayableManagerHelper * Helper
const char * m_Focus
Focus of this displayableManager is set to a specific annotation type when inherited.
virtual void UpdateFromMRMLScene()
Abstract Superclass for all specific types of MRML nodes.
MRML node for storing information about the active nodes in the scene.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void UpdatePosition(vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLNode *vtkNotUsed(node))
Update just the position for the widget, implemented by subclasses.
virtual void OnInteractorStyleEvent(int eventid)