Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLSliceIntersectionInteractionRepresentationHelper.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Ebatinca S.L., Las Palmas de Gran Canaria, Spain
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
22
23#ifndef vtkMRMLSliceIntersectionInteractionRepresentationHelper_h
24#define vtkMRMLSliceIntersectionInteractionRepresentationHelper_h
25
26#include "vtkMRMLDisplayableManagerExport.h" // For export macro
27
28// VTK includes
29#include <vtkObject.h>
30class vtkPoints;
31class vtkMatrix4x4;
33
34class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLSliceIntersectionInteractionRepresentationHelper : public vtkObject
35{
36 public:
41
43
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
50 int IntersectWithFinitePlane(double n[3], double o[3], double pOrigin[3], double px[3], double py[3], double x0[3], double x1[3]);
51
53 void GetIntersectionWithSliceViewBoundaries(double* pointA, double* pointB, double* sliceViewBounds, double* intersectionPoint);
54
56 void GetSliceViewBoundariesXY(vtkMRMLSliceNode* sliceNode, double* sliceViewBounds);
57
58 int GetLineTipsFromIntersectingSliceNode(vtkMRMLSliceNode* intersectingSliceNode, vtkMatrix4x4* intersectingXYToXY,
59 double intersectionLineTip1[3], double intersectionLineTip2[3]);
60
61 void ComputeHandleToWorldTransformMatrix(double handlePosition[2], double handleOrientation[2], vtkMatrix4x4* handleToWorldTransformMatrix);
62 void RotationMatrixFromVectors(double vector1[2], double vector2[2], vtkMatrix4x4* rotationMatrixHom);
63
64 protected:
67
68 private:
70 void operator=(const vtkMRMLSliceIntersectionInteractionRepresentationHelper&) = delete;
71};
72
73#endif
static vtkMRMLSliceIntersectionInteractionRepresentationHelper * New()
int IntersectWithFinitePlane(double n[3], double o[3], double pOrigin[3], double px[3], double py[3], double x0[3], double x1[3])
void GetIntersectionWithSliceViewBoundaries(double *pointA, double *pointB, double *sliceViewBounds, double *intersectionPoint)
Compute intersection between a 2D line and the slice view boundaries.
void GetSliceViewBoundariesXY(vtkMRMLSliceNode *sliceNode, double *sliceViewBounds)
Get boundaries of the slice view associated with a given vtkMRMLSliceNode.
int GetLineTipsFromIntersectingSliceNode(vtkMRMLSliceNode *intersectingSliceNode, vtkMatrix4x4 *intersectingXYToXY, double intersectionLineTip1[3], double intersectionLineTip2[3])
void PrintSelf(ostream &os, vtkIndent indent) override
void ComputeHandleToWorldTransformMatrix(double handlePosition[2], double handleOrientation[2], vtkMatrix4x4 *handleToWorldTransformMatrix)
void RotationMatrixFromVectors(double vector1[2], double vector2[2], vtkMatrix4x4 *rotationMatrixHom)
MRML node for storing a slice through RAS space.