26 #ifndef vtkMRMLSliceIntersectionInteractionRepresentation_h 27 #define vtkMRMLSliceIntersectionInteractionRepresentation_h 29 #include "vtkMRMLDisplayableManagerExport.h" 42 class vtkPolyDataMapper2D;
46 class vtkTextProperty;
47 class vtkLeaderActor2D;
52 class SliceIntersectionInteractionDisplayPipeline;
68 void PrintSelf(ostream& os, vtkIndent indent)
override;
81 void UpdateIntersectingSliceNodes();
82 void RemoveAllIntersectingSliceNodes();
97 void ComputeSliceIntersectionPoint();
100 double* GetSliceIntersectionPoint();
103 bool IsMouseCursorInSliceView(
double cursorPosition[2]);
105 void SetPipelinesHandlesVisibility(
bool visible);
106 void SetPipelinesHandlesOpacity(
double opacity);
108 void TransformIntersectingSlices(vtkMatrix4x4* rotatedSliceToSliceTransformMatrix);
114 int& foundComponentType,
int& foundComponentIndex,
double& closestDistance2,
double& handleOpacity);
116 virtual double GetMaximumHandlePickingDistance2();
121 HandleInfo(
int index,
int componentType,
const std::string& intersectingSliceNodeID,
double positionWorld[3],
double positionLocal[3])
123 , ComponentType(componentType)
124 , IntersectingSliceNodeID(intersectingSliceNodeID)
126 for (
int i = 0; i < 3; ++i)
128 this->PositionWorld[i] = positionWorld[i];
130 this->PositionWorld[3] = 1.0;
131 for (
int i = 0; i < 3; ++i)
133 this->PositionLocal[i] = positionLocal[i];
135 this->PositionLocal[3] = 1.0;
140 double PositionLocal[4];
141 double PositionWorld[4];
146 virtual HandleInfoList GetHandleInfoList(SliceIntersectionInteractionDisplayPipeline* pipeline);
148 virtual int GetTranslateArrowCursor(
const std::string& intersectingSliceNodeID);
154 SliceIntersectionInteractionDisplayPipeline* GetDisplayPipelineFromSliceLogic(
vtkMRMLSliceLogic* sliceLogic);
156 static void SliceNodeModifiedCallback(vtkObject* caller,
unsigned long eid,
void* clientData,
void* callData);
160 void UpdateSliceIntersectionDisplay(SliceIntersectionInteractionDisplayPipeline* pipeline);
166 double GetSliceRotationAngleRad(
int eventPos[2]);
168 double GetLineThicknessFromMode(
int lineThicknessMode);
171 double LastEventPosition[2];
174 double SliceIntersectionPoint[4];
183 double InteractionSize{ 3.0 };
185 double GetViewScaleFactorAtPosition(
double positionWorld[3]);
std::string IntersectingSliceNodeID
MRML node to represent a display property of 3D surface model.
bool SliceIntersectionPointFound
Indicate whether a valid slice intersection point was found or not.
MRML node to store display properties of slice nodes.
MRML node for storing a slice through RAS space.
represent intersections of other slice views in the current slice view
std::vector< HandleInfo > HandleInfoList
Get the list of info for all interaction handles.
HandleInfo(int index, int componentType, const std::string &intersectingSliceNodeID, double positionWorld[3], double positionLocal[3])
represent intersections of other slice views in the current slice view
vtkMRMLApplicationLogic * MRMLApplicationLogic
vtkMRMLSliceIntersectionInteractionRepresentationHelper * Helper
Abstract Superclass for all specific types of MRML nodes.
Slicer logic class for slice manipulation.