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();
123 double GetMaximumInteractionHandlePickingDistance2();
128 virtual bool IsControlPointDisplayableOnSlice(
vtkMRMLMarkupsNode* node,
int pointIndex = 0);
131 virtual void UpdateDistanceColorMap(vtkDiscretizableColorTransferFunction* colormap,
double color[3]);
143 void GetWorldToDisplayCoordinates(
double r,
double a,
double s,
double * displayCoordinates);
144 void GetWorldToDisplayCoordinates(
double * worldCoordinates,
double * displayCoordinates);
147 bool IsRepresentationIntersectingSlice(vtkPolyData* representation,
const char* arrayName);
156 vtkSmartPointer<vtkPolyDataMapper2D>
Mapper;
168 bool CenterVisibilityOnSlice = {
false };
169 bool AnyPointVisibilityOnSlice = {
false };
174 virtual void UpdateAllPointsAndLabelsFromMRML(
double labelsOffset);
176 double GetWidgetOpacity(
int controlPointType);
184 void GetViewPlaneNormal(
double viewPlaneNormal[3])
override;
MRML node for storing a slice through RAS space.
Abstract Superclass for all specific types of MRML nodes.