30 #ifndef vtkSlicerMarkupsWidgetRepresentation2D_h 31 #define vtkSlicerMarkupsWidgetRepresentation2D_h 33 #include "vtkSlicerMarkupsModuleVTKWidgetsExport.h" 39 class vtkDiscretizableColorTransferFunction;
41 class vtkLabelPlacementMapper;
44 class vtkPolyDataMapper2D;
54 void PrintSelf(ostream& os, vtkIndent indent)
override;
58 int &foundComponentType,
int &foundComponentIndex,
double &closestDistance2)
override;
62 int& foundComponentType,
int& foundComponentIndex,
double& closestDistance2);
67 int &foundComponentType,
int &foundComponentIndex,
double &closestDistance2);
75 void GetActors(vtkPropCollection *)
override;
90 virtual bool GetNthControlPointViewVisibility(
int n);
93 virtual void SetNthControlPointSliceVisibility(
int n,
bool visibility);
96 virtual void SetCenterSliceVisibility(
bool visibility);
98 void GetSliceToWorldCoordinates(
const double[2],
double[3]);
99 void GetWorldToSliceCoordinates(
const double worldPos[3],
double slicePos[2]);
113 void UpdatePlaneFromSliceNode();
120 double GetMaximumControlPointPickingDistance2();
125 virtual bool IsControlPointDisplayableOnSlice(
vtkMRMLMarkupsNode* node,
int pointIndex = 0);
128 virtual void UpdateDistanceColorMap(vtkDiscretizableColorTransferFunction* colormap,
double color[3]);
140 void GetWorldToDisplayCoordinates(
double r,
double a,
double s,
double * displayCoordinates);
141 void GetWorldToDisplayCoordinates(
double * worldCoordinates,
double * displayCoordinates);
150 vtkSmartPointer<vtkPolyDataMapper2D>
Mapper;
162 bool CenterVisibilityOnSlice = {
false };
163 bool AnyPointVisibilityOnSlice = {
false };
168 virtual void UpdateAllPointsAndLabelsFromMRML(
double labelsOffset);
170 double GetWidgetOpacity(
int controlPointType);
178 void GetViewPlaneNormal(
double viewPlaneNormal[3])
override;
MRML node for storing a slice through RAS space.
Abstract Superclass for all specific types of MRML nodes.