Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerLineRepresentation3D.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 vtkSlicerLineRepresentation3D_h
31 #define vtkSlicerLineRepresentation3D_h
32 
33 #include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
35 
36 class vtkActor;
37 class vtkPolyDataMapper;
38 class vtkPolyData;
39 class vtkTubeFilter;
40 
42 
43 class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkSlicerLineRepresentation3D : public vtkSlicerMarkupsWidgetRepresentation3D
44 {
45 public:
47  static vtkSlicerLineRepresentation3D *New();
48 
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
56  void UpdateFromMRML(vtkMRMLNode* caller, unsigned long event, void *callData=nullptr) override;
57 
58  void CanInteract(vtkMRMLInteractionEventData* interactionEventData,
59  int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override;
60 
62  void GetActors(vtkPropCollection *) override;
63  void ReleaseGraphicsResources(vtkWindow *) override;
64  int RenderOverlay(vtkViewport *viewport) override;
65  int RenderOpaqueGeometry(vtkViewport *viewport) override;
66  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
67  vtkTypeBool HasTranslucentPolygonalGeometry() override;
68 
70  double *GetBounds() override;
71 
72 protected:
75 
77  void UpdateInteractionPipeline() override;
78 
79  vtkSmartPointer<vtkPolyData> Line;
80  vtkSmartPointer<vtkTubeFilter> TubeFilter;
81 
82  vtkSmartPointer<vtkPolyDataMapper> LineMapper;
83  vtkSmartPointer<vtkPolyDataMapper> LineOccludedMapper;
84 
85  vtkSmartPointer<vtkActor> LineActor;
86  vtkSmartPointer<vtkActor> LineOccludedActor;
87 
88 private:
90  void operator=(const vtkSlicerLineRepresentation3D&) = delete;
91 };
92 
93 #endif
vtkSmartPointer< vtkPolyDataMapper > LineOccludedMapper
int RenderOpaqueGeometry(vtkViewport *viewport) override
vtkSmartPointer< vtkPolyData > Line
void PrintSelf(ostream &os, vtkIndent indent) override
vtkTypeBool HasTranslucentPolygonalGeometry() override
Default representation for the markups widget in 3D views.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Default representation for the line widget.
vtkSmartPointer< vtkActor > LineOccludedActor
void UpdateInteractionPipeline() override
Update the interaction pipeline.
vtkSmartPointer< vtkTubeFilter > TubeFilter
void UpdateFromMRML(vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
double * GetBounds() override
Return the bounds of the representation.
int RenderOverlay(vtkViewport *viewport) override
void CanInteract(vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void ReleaseGraphicsResources(vtkWindow *) override
vtkSmartPointer< vtkPolyDataMapper > LineMapper
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.