Slicer 5.8
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
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
50
52{
53public:
58
60
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
69
74
76
79 void GetActors2D(vtkPropCollection *) override;
80 void ReleaseGraphicsResources(vtkWindow *) override;
81 int RenderOverlay(vtkViewport *viewport) override;
83
85 vtkGetObjectMacro(MRMLApplicationLogic, vtkMRMLApplicationLogic);
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);
98 void SliceNodeModified(vtkMRMLSliceNode* sliceNode);
99 void SliceModelDisplayNodeModified(vtkMRMLModelDisplayNode* sliceNode);
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
114 double LastEventPosition[2];
115
116 // Slice intersection point in XY
117 double SliceIntersectionPoint[4];
118
119 vtkMRMLApplicationLogic* MRMLApplicationLogic;
120
121 class vtkInternal;
122 vtkInternal * Internal;
123
124private:
126 void operator=(const vtkMRMLSliceIntersectionRepresentation2D&) = delete;
127};
128
129#endif
MRML node to represent a display property of 3D surface model.
represent intersections of other slice views in the current slice view
double * GetSliceIntersectionPoint() VTK_SIZEHINT(3)
static vtkMRMLSliceIntersectionRepresentation2D * New()
void SetSliceNode(vtkMRMLSliceNode *sliceNode)
void AddIntersectingSliceLogic(vtkMRMLSliceLogic *sliceLogic)
void GetActors2D(vtkPropCollection *) override
void ReleaseGraphicsResources(vtkWindow *) override
void RemoveIntersectingSliceNode(vtkMRMLSliceNode *sliceNode)
int RenderOverlay(vtkViewport *viewport) override
void PrintSelf(ostream &os, vtkIndent indent) override
void SetMRMLApplicationLogic(vtkMRMLApplicationLogic *)
Slicer logic class for slice manipulation.
MRML node for storing a slice through RAS space.