Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLSliceIntersectionRepresentation2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMRMLSliceIntersectionRepresentation2D.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or https://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
23
24#ifndef vtkMRMLSliceIntersectionRepresentation2D_h
25#define vtkMRMLSliceIntersectionRepresentation2D_h
26
27#include "vtkMRMLDisplayableManagerExport.h" // For export macro
29
30#include "vtkMRMLSliceNode.h"
31
35
36class vtkProperty2D;
37class vtkActor2D;
38class vtkPolyDataMapper2D;
39class vtkPolyData;
40class vtkPoints;
41class vtkCellArray;
42class vtkTextProperty;
43class vtkLeaderActor2D;
44class vtkTextMapper;
45class vtkTransform;
46class vtkActor2D;
47
48class SliceIntersectionDisplayPipeline;
49
51{
52public:
57
59
63 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67 void SetViewNode(vtkMRMLAbstractViewNode* viewNode) override;
69
74
76
79 void GetActors2D(vtkPropCollection*) override;
80 void ReleaseGraphicsResources(vtkWindow*) override;
81 int RenderOverlay(vtkViewport* viewport) override;
83
86
87 double* GetSliceIntersectionPoint() VTK_SIZEHINT(3);
88
89 void TransformIntersectingSlices(vtkMatrix4x4* rotatedSliceToSliceTransformMatrix);
90
91protected:
94
95 SliceIntersectionDisplayPipeline* GetDisplayPipelineFromSliceLogic(vtkMRMLSliceLogic* sliceLogic);
96
97 static void SliceNodeModifiedCallback(vtkObject* caller, unsigned long eid, void* clientData, void* callData);
100
101 void UpdateSliceIntersectionDisplay(SliceIntersectionDisplayPipeline* pipeline);
102
103 double GetSliceRotationAngleRad(int eventPos[2]);
104
105 // The internal transformation matrix
106 vtkTransform* CurrentTransform;
107 vtkTransform* TotalTransform;
108 double Origin[4]; // the current origin in world coordinates
109 double DisplayOrigin[3]; // the current origin in display coordinates
110 double CurrentTranslation[3]; // translation this movement
111 double StartWorldPosition[4]; // Start event position converted to world
112
113 // Support picking
115
116 // Slice intersection point in XY
118
120
121 class vtkInternal;
122 vtkInternal* Internal;
123
124private:
126 void operator=(const vtkMRMLSliceIntersectionRepresentation2D&) = delete;
127};
128
129#endif
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
MRML node to represent a display property of 3D surface model.
double * GetSliceIntersectionPoint() VTK_SIZEHINT(3)
void TransformIntersectingSlices(vtkMatrix4x4 *rotatedSliceToSliceTransformMatrix)
static vtkMRMLSliceIntersectionRepresentation2D * New()
void SliceModelDisplayNodeModified(vtkMRMLModelDisplayNode *sliceNode)
double GetSliceRotationAngleRad(int eventPos[2])
void SliceNodeModified(vtkMRMLSliceNode *sliceNode)
void AddIntersectingSliceLogic(vtkMRMLSliceLogic *sliceLogic)
void GetActors2D(vtkPropCollection *) override
void ReleaseGraphicsResources(vtkWindow *) override
void RemoveIntersectingSliceNode(vtkMRMLSliceNode *sliceNode)
void SetViewNode(vtkMRMLAbstractViewNode *viewNode) override
Sets the view node. Accepts only vtkMRMLSliceNode; use GetSliceNode() to retrieve it.
static void SliceNodeModifiedCallback(vtkObject *caller, unsigned long eid, void *clientData, void *callData)
int RenderOverlay(vtkViewport *viewport) override
void PrintSelf(ostream &os, vtkIndent indent) override
SliceIntersectionDisplayPipeline * GetDisplayPipelineFromSliceLogic(vtkMRMLSliceLogic *sliceLogic)
void SetMRMLApplicationLogic(vtkMRMLApplicationLogic *)
void UpdateSliceIntersectionDisplay(SliceIntersectionDisplayPipeline *pipeline)
Slicer logic class for slice manipulation.
MRML node for storing a slice through RAS space.