Slicer 5.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerAngleRepresentation2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Copyright (c) ProxSim ltd., Kwun Tong, Hong Kong. All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS,
10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 See the License for the specific language governing permissions and
12 limitations under the License.
13
14 This file was originally developed by Davide Punzo, punzodavide@hotmail.it,
15 and development was supported by ProxSim ltd.
16
17=========================================================================*/
18
30#ifndef vtkSlicerAngleRepresentation2D_h
31#define vtkSlicerAngleRepresentation2D_h
32
33#include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
35
36#include "vtkLookupTable.h"
37
38class vtkArcSource;
39class vtkDiscretizableColorTransferFunction;
40class vtkSampleImplicitFunctionFilter;
41class vtkTubeFilter;
42
44
45class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkSlicerAngleRepresentation2D : public vtkSlicerMarkupsWidgetRepresentation2D
46{
47public:
50
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 void UpdateFromMRMLInternal(vtkMRMLNode* caller, unsigned long event, void *callData = nullptr) override;
59
61 void GetActors(vtkPropCollection *) override;
62 void ReleaseGraphicsResources(vtkWindow *) override;
63 int RenderOverlay(vtkViewport *viewport) override;
64 int RenderOpaqueGeometry(vtkViewport *viewport) override;
65 int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
66 vtkTypeBool HasTranslucentPolygonalGeometry() override;
67
69 double* GetBounds() VTK_SIZEHINT(6) override;
70
71 void CanInteract(vtkMRMLInteractionEventData* interactionEventData,
72 int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override;
73
74 bool GetTransformationReferencePoint(double referencePointWorld[3]) override;
75
76protected:
79
80 void SetMarkupsNode(vtkMRMLMarkupsNode *markupsNode) override;
81
82 void BuildArc();
83
84 vtkSmartPointer<vtkPolyData> Line;
85 vtkSmartPointer<vtkPolyDataMapper2D> LineMapper;
86 vtkSmartPointer<vtkActor2D> LineActor;
87 vtkSmartPointer<vtkArcSource> Arc;
88 vtkSmartPointer<vtkPolyDataMapper2D> ArcMapper;
89 vtkSmartPointer<vtkActor2D> ArcActor;
90 vtkSmartPointer<vtkDiscretizableColorTransferFunction> ColorMap;
91
92 vtkSmartPointer<vtkTubeFilter> TubeFilter;
93 vtkSmartPointer<vtkTubeFilter> ArcTubeFilter;
94
95 vtkSmartPointer<vtkTransformPolyDataFilter> LineWorldToSliceTransformer;
96 vtkSmartPointer<vtkTransformPolyDataFilter> ArcWorldToSliceTransformer;
97
98 vtkSmartPointer<vtkSampleImplicitFunctionFilter> LineSliceDistance;
99 vtkSmartPointer<vtkSampleImplicitFunctionFilter> ArcSliceDistance;
100
101private:
103 void operator=(const vtkSlicerAngleRepresentation2D&) = delete;
104};
105
106#endif
Abstract Superclass for all specific types of MRML nodes.
Default representation for the line widget.
static vtkSlicerAngleRepresentation2D * New()
Instantiate this class.
void UpdateFromMRMLInternal(vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
double * GetBounds() VTK_SIZEHINT(6) override
Return the bounds of the representation.
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
int RenderOverlay(vtkViewport *viewport) override
int RenderOpaqueGeometry(vtkViewport *viewport) override
vtkTypeBool HasTranslucentPolygonalGeometry() override
void ReleaseGraphicsResources(vtkWindow *) override
void PrintSelf(ostream &os, vtkIndent indent) override
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Default representation for the slicer markups widget.