28 #ifndef vtkSlicerMarkupsWidget_h 29 #define vtkSlicerMarkupsWidget_h 31 #include "vtkSlicerMarkupsModuleVTKWidgetsExport.h" 33 #include "vtkWidgetCallbackMapper.h" 50 void PrintSelf(ostream& os, vtkIndent indent)
override;
66 WidgetStateMarkups_Last
82 WidgetEventMarkups_Last
86 bool IsPointPreviewed();
96 bool RemovePreviewPoint();
104 virtual int AddPointFromWorldCoordinate(
const double worldCoordinates[3]);
108 virtual int AddNodeOnWidget(
const int displayPos[2]);
126 int GetActiveControlPoint();
130 int GetActiveComponentType();
131 int GetActiveComponentIndex();
140 void EndWidgetInteraction();
142 virtual void TranslatePoint(
double eventPos[2],
bool snapToSlice =
false);
143 virtual void TranslateWidget(
double eventPos[2]);
144 virtual void ScaleWidget(
double eventPos[2]);
145 virtual void RotateWidget(
double eventPos[2]);
147 bool IsAnyControlPointLocked();
154 bool ConvertDisplayPositionToWorld(
const int displayPos[2],
double worldPos[3],
double worldOrientationMatrix[9],
155 double* refWorldPos =
nullptr);
181 virtual bool GetClosestPointOnInteractionAxis(
int type,
int index,
const double inputDisplay[2],
double outputIntersectionWorld[3]);
185 virtual bool GetIntersectionOnAxisPlane(
int type,
int index,
const double inputDisplay[2],
double outputIntersectionWorld[3]);
188 double LastEventPosition[2];
189 double StartEventOffsetPosition[2];
199 #ifdef VTK_HAS_INITIALIZE_OBJECT_BASE 200 #define vtkSlicerMarkupsWidgetCreateInstanceMacro(type) \ 201 vtkSlicerMarkupsWidget* CreateInstance() const override\ 203 vtkObject* ret = vtkObjectFactory::CreateInstance(#type); \ 206 return static_cast<type *>(ret); \ 208 type* result = new type; \ 209 result->InitializeObjectBase(); \ 213 #define vtkSlicerMarkupsWidgetCreateInstanceMacro(type) \ 214 vtkSlicerMarkupsWidget* CreateInstance() const override\ 216 vtkObject* ret = vtkObjectFactory::CreateInstance(#type); \ 219 return static_cast<type *>(ret); \
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
MRML node for storing information about the active nodes in the scene.