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)
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();
146 void SetAndObserveNodes();
149 void AddObserversToInteractionNode();
150 void RemoveObserversFromInteractionNode();
157 void AddObserversToSelectionNode();
158 void RemoveObserversFromSelectionNode();
161 virtual void OnMRMLAnnotationNodeModifiedEvent(
vtkMRMLNode* node);
162 virtual void OnMRMLAnnotationNodeTransformModifiedEvent(
vtkMRMLNode* node);
163 virtual void OnMRMLAnnotationNodeLockModifiedEvent(
vtkMRMLNode* node);
164 virtual void OnMRMLAnnotationDisplayNodeModifiedEvent(
vtkMRMLNode *node);
165 virtual void OnMRMLAnnotationControlPointModifiedEvent(
vtkMRMLNode *node);
173 void OnClickInRenderWindowGetCoordinates();
175 virtual void OnClickInRenderWindow(
double x,
double y,
const char *associatedNodeID =
nullptr);
186 virtual void PlaceSeed(
double x,
double y);
188 vtkHandleWidget * GetSeed(
int index);
199 void GetWorldToDisplayCoordinates(
double r,
double a,
double s,
double * displayCoordinates);
200 void GetWorldToDisplayCoordinates(
double * worldCoordinates,
double * displayCoordinates);
203 void GetDisplayToViewportCoordinates(
double x,
double y,
double * viewportCoordinates);
204 void GetDisplayToViewportCoordinates(
double *displayCoordinates,
double * viewportCoordinates);
218 bool IsCorrectDisplayableManager();
229 virtual bool IsManageable(
const char* nodeClassName);
241 vtkGetMacro(DisableInteractorStyleEventsProcessing,
int);
245 double LastClickWorldCoordinates[4];
253 int DisableInteractorStyleEventsProcessing;
256 double ScaleFactor2D;
Superclass for displayable manager classes.
virtual void RemoveMRMLObservers()
Remove MRML observers.
void PrintSelf(ostream &os, vtkIndent indent) override
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)
int m_Updating
Disable processing when updating is in progress.
A set of MRML Nodes that supports serialization and undo/redo.
virtual bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData)
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
virtual void OnMRMLSelectionNodeUnitModifiedEvent(vtkMRMLSelectionNode *)
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *)
virtual void UpdateFromMRML()
void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData) override
void SetMRMLSceneInternal(vtkMRMLScene *newScene) override
vtkMRMLAnnotationDisplayableManagerHelper * Helper
virtual bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2)
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.
virtual void UpdatePosition(vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLNode *vtkNotUsed(node))
Update just the position for the widget, implemented by subclasses.
virtual void OnInteractorStyleEvent(int eventid)