Slicer 5.9
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
68
73
75
78 void GetActors2D(vtkPropCollection*) override;
79 void ReleaseGraphicsResources(vtkWindow*) override;
80 int RenderOverlay(vtkViewport* viewport) override;
82
85
86 double* GetSliceIntersectionPoint() VTK_SIZEHINT(3);
87
88 void TransformIntersectingSlices(vtkMatrix4x4* rotatedSliceToSliceTransformMatrix);
89
90protected:
93
94 SliceIntersectionDisplayPipeline* GetDisplayPipelineFromSliceLogic(vtkMRMLSliceLogic* sliceLogic);
95
96 static void SliceNodeModifiedCallback(vtkObject* caller, unsigned long eid, void* clientData, void* callData);
99
100 void UpdateSliceIntersectionDisplay(SliceIntersectionDisplayPipeline* pipeline);
101
102 double GetSliceRotationAngleRad(int eventPos[2]);
103
104 // The internal transformation matrix
105 vtkTransform* CurrentTransform;
106 vtkTransform* TotalTransform;
107 double Origin[4]; // the current origin in world coordinates
108 double DisplayOrigin[3]; // the current origin in display coordinates
109 double CurrentTranslation[3]; // translation this movement
110 double StartWorldPosition[4]; // Start event position converted to world
111
112 // Support picking
114
115 // Slice intersection point in XY
117
119
120 class vtkInternal;
121 vtkInternal* Internal;
122
123private:
125 void operator=(const vtkMRMLSliceIntersectionRepresentation2D&) = delete;
126};
127
128#endif
MRML node to represent a display property of 3D surface model.
double * GetSliceIntersectionPoint() VTK_SIZEHINT(3)
void TransformIntersectingSlices(vtkMatrix4x4 *rotatedSliceToSliceTransformMatrix)
static vtkMRMLSliceIntersectionRepresentation2D * New()
void SetSliceNode(vtkMRMLSliceNode *sliceNode)
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)
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.