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;
106 bool IsMouseCursorInSliceView(
double cursorPosition[2]);
108 void SetPipelinesHandlesVisibility(
bool visible);
109 void SetPipelinesHandlesOpacity(
double opacity);
111 void TransformIntersectingSlices(vtkMatrix4x4* rotatedSliceToSliceTransformMatrix);
117 int& foundComponentType,
int& foundComponentIndex,
double& closestDistance2,
double& handleOpacity);
119 virtual
double GetMaximumHandlePickingDistance2();
124 HandleInfo(
int index,
int componentType,
const std::string& intersectingSliceNodeID,
double positionWorld[3],
double positionLocal[3])
126 , ComponentType(componentType)
127 , IntersectingSliceNodeID(intersectingSliceNodeID)
129 for (
int i = 0; i < 3; ++i)
131 this->PositionWorld[i] = positionWorld[i];
133 this->PositionWorld[3] = 1.0;
134 for (
int i = 0; i < 3; ++i)
136 this->PositionLocal[i] = positionLocal[i];
138 this->PositionLocal[3] = 1.0;
143 double PositionLocal[4];
144 double PositionWorld[4];
174 double LastEventPosition[2];
177 double SliceIntersectionPoint[4];
186 double InteractionSize{ 3.0 };
193 vtkSmartPointer<vtkMRMLSliceIntersectionInteractionRepresentationHelper>
Helper;
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.
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)
double GetLineThicknessFromMode(int lineThicknessMode)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLSliceDisplayNode * GetSliceDisplayNode()
bool DistanceFromSliceIntersectionToPoint(vtkMRMLSliceNode *intersectingSlice, double point_RAS[3], double &distance)
Compute distance between a point and a slice intersection.
double GetSliceRotationAngleRad(int eventPos[2])
bool SliceIntersectionPointFound
Indicate whether a valid slice intersection point was found or not.
virtual HandleInfoList GetHandleInfoList(SliceIntersectionInteractionDisplayPipeline *pipeline)
vtkSmartPointer< vtkMRMLSliceIntersectionInteractionRepresentationHelper > Helper
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)
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.