18 #ifndef __vtkMRMLMarkupsDisplayableManager2D_h 19 #define __vtkMRMLMarkupsDisplayableManager2D_h 22 #include "vtkSlicerMarkupsModuleMRMLDisplayableManagerExport.h" 32 #include <vtkHandleWidget.h> 33 #include <vtkSeedWidget.h> 36 class vtkSlicerViewerWidget;
38 class vtkAbstractWidget;
48 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
56 virtual void PropagateMRMLToWidget(
vtkMRMLMarkupsNode* node, vtkAbstractWidget * widget);
58 virtual void PropagateWidgetToMRML(vtkAbstractWidget * widget,
vtkMRMLMarkupsNode* node);
65 bool RestrictDisplayCoordinatesToViewport(
double* displayCoordinates);
68 bool GetDisplayCoordinatesChanged(
double * displayCoordinates1,
double * displayCoordinates2);
71 bool GetWorldCoordinatesChanged(
double * worldCoordinates1,
double * worldCoordinates2);
74 void GetDisplayToWorldCoordinates(
double x,
double y,
double * worldCoordinates);
75 void GetDisplayToWorldCoordinates(
double * displayCoordinates,
double * worldCoordinates);
79 double *worldCoordinates,
double *localCoordinates);
85 vtkSetMacro(ScaleFactor2D,
double);
86 vtkGetMacro(ScaleFactor2D,
double);
97 bool IsInLightboxMode();
107 vtkAbstractWidget *vtkNotUsed(widget),
115 vtkAbstractWidget *vtkNotUsed(widget))
133 virtual
void UpdateFromMRML() VTK_OVERRIDE;
135 virtual
void SetMRMLSceneInternal(
vtkMRMLScene* newScene) VTK_OVERRIDE;
139 virtual
void UpdateFromMRMLScene() VTK_OVERRIDE;
140 virtual
void OnMRMLSceneEndClose() VTK_OVERRIDE;
141 virtual
void OnMRMLSceneNodeAdded(
vtkMRMLNode* node) VTK_OVERRIDE;
142 virtual
void OnMRMLSceneNodeRemoved(
vtkMRMLNode* node) VTK_OVERRIDE;
145 virtual
void OnMRMLDisplayableNodeModifiedEvent(vtkObject* caller) VTK_OVERRIDE;
148 virtual
void OnMRMLSliceNodeModifiedEvent() VTK_OVERRIDE;
152 virtual
bool IsWidgetDisplayableOnSlice(
vtkMRMLMarkupsNode* node,
int markupIndex = 0);
157 void SetAndObserveNodes();
160 void AddObserversToInteractionNode();
161 void RemoveObserversFromInteractionNode();
164 void OnMRMLMarkupsNodeModifiedEvent(
vtkMRMLNode* node);
165 void OnMRMLMarkupsNodeTransformModifiedEvent(
vtkMRMLNode* node);
166 void OnMRMLMarkupsNodeLockModifiedEvent(
vtkMRMLNode* node);
167 void OnMRMLMarkupsDisplayNodeModifiedEvent(
vtkMRMLNode *node);
168 void OnMRMLMarkupsPointModifiedEvent(
vtkMRMLNode *node,
int n);
170 virtual
void OnMRMLMarkupsNodeMarkupAddedEvent(
vtkMRMLMarkupsNode * vtkNotUsed(markupsNode),
int vtkNotUsed(
n)) {};
179 void OnClickInRenderWindowGetCoordinates();
181 virtual void OnClickInRenderWindow(
double x,
double y,
const char *associatedNodeID = NULL);
193 virtual void PlaceSeed(
double x,
double y);
195 vtkHandleWidget * GetSeed(
int index);
202 void GetWorldToDisplayCoordinates(
double r,
double a,
double s,
double * displayCoordinates);
203 void GetWorldToDisplayCoordinates(
double * worldCoordinates,
double * displayCoordinates);
206 void GetDisplayToViewportCoordinates(
double x,
double y,
double * viewportCoordinates);
207 void GetDisplayToViewportCoordinates(
double *displayCoordinates,
double * viewportCoordinates);
221 virtual bool IsCorrectDisplayableManager();
232 virtual bool IsManageable(
const char* nodeClassName);
244 vtkGetMacro(DisableInteractorStyleEventsProcessing,
int);
248 double LastClickWorldCoordinates[4];
256 int DisableInteractorStyleEventsProcessing;
261 double ScaleFactor2D;
virtual void RemoveMRMLObservers()
Remove MRML observers.
virtual bool UpdateNthSeedPositionFromMRML(int vtkNotUsed(n), vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLMarkupsNode *vtkNotUsed(markupsNode))
MRML node for storing a slice through RAS space.
vtkMRMLMarkupsClickCounter * ClickCounter
Counter for clicks in Render Window.
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
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.
A set of MRML Nodes that supports serialization and undo/redo.
const char * Focus
Focus of this displayableManager is set to a specific markups type when inherited.
vtkMRMLMarkupsDisplayableManagerHelper * Helper
virtual void SetParentTransformToWidget(vtkMRMLMarkupsNode *vtkNotUsed(node), vtkAbstractWidget *vtkNotUsed(widget))
Set mrml parent transform to widgets.
virtual void OnMRMLMarkupsNodeNthMarkupModifiedEvent(vtkMRMLMarkupsNode *vtkNotUsed(node), int vtkNotUsed(n))
static vtkMRMLAbstractSliceViewDisplayableManager * New()
int Updating
Disable processing when updating is in progress.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Superclass for displayable manager classes.
virtual void OnMRMLMarkupsNodeMarkupRemovedEvent(vtkMRMLMarkupsNode *vtkNotUsed(markupsNode), int vtkNotUsed(n))
virtual bool UpdateNthMarkupPositionFromWidget(int vtkNotUsed(n), vtkMRMLMarkupsNode *vtkNotUsed(pointsNode), vtkAbstractWidget *vtkNotUsed(widget))
Abstract Superclass for all specific types of MRML nodes.
vtkMRMLMarkupsDisplayableManagerHelper * GetHelper()
virtual void OnInteractorStyleEvent(int eventid)