26#ifndef vtkMRMLSliceIntersectionInteractionRepresentation_h
27#define vtkMRMLSliceIntersectionInteractionRepresentation_h
29#include "vtkMRMLDisplayableManagerExport.h"
42class vtkPolyDataMapper2D;
47class vtkLeaderActor2D;
52class SliceIntersectionInteractionDisplayPipeline;
68 void PrintSelf(ostream& os, vtkIndent indent)
override;
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];
171 double LastEventPosition[2];
174 double SliceIntersectionPoint[4];
183 double InteractionSize{ 3.0 };
MRML node to represent a display property of 3D surface model.
Abstract Superclass for all specific types of MRML nodes.
MRML node to store display properties of slice nodes.
represent intersections of other slice views in the current slice view
HandleInfo(int index, int componentType, const std::string &intersectingSliceNodeID, double positionWorld[3], double positionLocal[3])
std::string IntersectingSliceNodeID
represent intersections of other slice views in the current slice view
void SetSliceDisplayNode(vtkMRMLSliceDisplayNode *sliceDisplayNode)
vtkMRMLSliceIntersectionInteractionRepresentationHelper * Helper
double GetLineThicknessFromMode(int lineThicknessMode)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLSliceDisplayNode * GetSliceDisplayNode()
double GetSliceRotationAngleRad(int eventPos[2])
bool SliceIntersectionPointFound
Indicate whether a valid slice intersection point was found or not.
virtual HandleInfoList GetHandleInfoList(SliceIntersectionInteractionDisplayPipeline *pipeline)
virtual int GetTranslateArrowCursor(const std::string &intersectingSliceNodeID)
void RemoveAllIntersectingSliceNodes()
vtkMRMLSliceDisplayNode * GetSliceDisplayNode(vtkMRMLSliceNode *sliceNode)
void UpdateFromMRML(vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
static void SliceNodeModifiedCallback(vtkObject *caller, unsigned long eid, void *clientData, void *callData)
double GetViewScaleFactorAtPosition(double positionWorld[3])
void SetSliceNode(vtkMRMLSliceNode *sliceNode)
void SetMRMLApplicationLogic(vtkMRMLApplicationLogic *)
void ComputeSliceIntersectionPoint()
Compute slice intersection point between red, green and yellow slice nodes.
double * GetSliceIntersectionPoint() VTK_SIZEHINT(3)
Get slice intersection point between red, green and yellow slice nodes.
vtkMRMLSliceIntersectionInteractionRepresentation()
static vtkMRMLSliceIntersectionInteractionRepresentation * New()
void GetActors2D(vtkPropCollection *) override
SliceIntersectionInteractionDisplayPipeline * GetDisplayPipelineFromSliceLogic(vtkMRMLSliceLogic *sliceLogic)
int RenderOverlay(vtkViewport *viewport) override
vtkMRMLApplicationLogic * MRMLApplicationLogic
void UpdateSliceIntersectionDisplay(SliceIntersectionInteractionDisplayPipeline *pipeline)
void RemoveIntersectingSliceNode(vtkMRMLSliceNode *sliceNode)
void SliceNodeModified(vtkMRMLSliceNode *sliceNode)
void AddIntersectingSliceLogic(vtkMRMLSliceLogic *sliceLogic)
std::vector< HandleInfo > HandleInfoList
Get the list of info for all interaction handles.
~vtkMRMLSliceIntersectionInteractionRepresentation() override
void UpdateIntersectingSliceNodes()
void ReleaseGraphicsResources(vtkWindow *) override
void SliceModelDisplayNodeModified(vtkMRMLModelDisplayNode *sliceNode)
vtkMRMLSliceNode * GetSliceNode()
Slicer logic class for slice manipulation.
MRML node for storing a slice through RAS space.