Slicer 5.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerCurveRepresentation3D.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
31#ifndef vtkSlicerCurveRepresentation3D_h
32#define vtkSlicerCurveRepresentation3D_h
33
34#include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
36
37class vtkActor;
38class vtkCellLocator;
39class vtkPolyDataMapper;
40class vtkPolyData;
41class vtkTubeFilter;
42
44
45class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkSlicerCurveRepresentation3D : public vtkSlicerMarkupsWidgetRepresentation3D
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 void CanInteractWithCurve(vtkMRMLInteractionEventData* interactionEventData,
75 int &foundComponentType, int &componentIndex, double &closestDistance2);
76
77protected:
80
81 void SetMarkupsNode(vtkMRMLMarkupsNode *markupsNode) override;
82
83 vtkSmartPointer<vtkPolyData> Line;
84 vtkSmartPointer<vtkTubeFilter> TubeFilter;
85
86 vtkSmartPointer<vtkPolyDataMapper> LineMapper;
87 vtkSmartPointer<vtkPolyDataMapper> LineOccludedMapper;
88
89 vtkSmartPointer<vtkActor> LineActor;
90 vtkSmartPointer<vtkActor> LineOccludedActor;
91
92 vtkSmartPointer<vtkCellLocator> CurvePointLocator;
93
94 double PreviousSpecularLightingCoeff{0.0};
95
96private:
98 void operator=(const vtkSlicerCurveRepresentation3D&) = delete;
99};
100
101#endif
Abstract Superclass for all specific types of MRML nodes.
Default representation for the curve widget.
int RenderOpaqueGeometry(vtkViewport *viewport) override
double * GetBounds() VTK_SIZEHINT(6) override
Return the bounds of the representation.
static vtkSlicerCurveRepresentation3D * New()
Instantiate this class.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
void ReleaseGraphicsResources(vtkWindow *) override
vtkTypeBool HasTranslucentPolygonalGeometry() override
int RenderOverlay(vtkViewport *viewport) override
void PrintSelf(ostream &os, vtkIndent indent) override
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
void UpdateFromMRMLInternal(vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
Default representation for the markups widget in 3D views.