Slicer  4.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerLineRepresentation2D.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 vtkSlicerLineRepresentation2D_h
31 #define vtkSlicerLineRepresentation2D_h
32 
33 #include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
35 
36 class vtkTubeFilter;
37 class vtkSampleImplicitFunctionFilter;
38 
40 
41 class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkSlicerLineRepresentation2D : public vtkSlicerMarkupsWidgetRepresentation2D
42 {
43 public:
45  static vtkSlicerLineRepresentation2D *New();
46 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  void UpdateFromMRML(vtkMRMLNode* caller, unsigned long event, void *callData=nullptr) override;
55 
56  void CanInteract(vtkMRMLInteractionEventData* interactionEventData,
57  int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override;
58 
60  void GetActors(vtkPropCollection *) override;
61  void ReleaseGraphicsResources(vtkWindow *) override;
62  int RenderOverlay(vtkViewport *viewport) override;
63  int RenderOpaqueGeometry(vtkViewport *viewport) override;
64  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
65  vtkTypeBool HasTranslucentPolygonalGeometry() override;
66 
67 
69  double *GetBounds() override;
70 
71 protected:
74 
75  void SetMarkupsNode(vtkMRMLMarkupsNode *markupsNode) override;
76 
78  void UpdateInteractionPipeline() override;
79 
80  vtkSmartPointer<vtkPolyData> Line;
81  vtkSmartPointer<vtkPolyDataMapper2D> LineMapper;
82  vtkSmartPointer<vtkActor2D> LineActor;
83  vtkSmartPointer<vtkDiscretizableColorTransferFunction> LineColorMap;
84 
85  vtkSmartPointer<vtkTubeFilter> TubeFilter;
86 
87  vtkSmartPointer<vtkTransformPolyDataFilter> WorldToSliceTransformer;
88  vtkSmartPointer<vtkSampleImplicitFunctionFilter> SliceDistance;
89 
90 private:
92  void operator=(const vtkSlicerLineRepresentation2D&) = delete;
93 };
94 
95 #endif
vtkSmartPointer< vtkPolyData > Line
vtkSmartPointer< vtkActor2D > LineActor
vtkSmartPointer< vtkTransformPolyDataFilter > WorldToSliceTransformer
vtkTypeBool HasTranslucentPolygonalGeometry() override
virtual void SetMarkupsNode(vtkMRMLMarkupsNode *markupsNode)
void UpdateInteractionPipeline() override
Update the interaction pipeline.
void UpdateFromMRML(vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
vtkSmartPointer< vtkTubeFilter > TubeFilter
int RenderOpaqueGeometry(vtkViewport *viewport) override
void PrintSelf(ostream &os, vtkIndent indent) override
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
vtkSmartPointer< vtkPolyDataMapper2D > LineMapper
int RenderOverlay(vtkViewport *viewport) override
Default representation for the slicer markups widget.
Default representation for the line widget.
vtkSmartPointer< vtkSampleImplicitFunctionFilter > SliceDistance
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void ReleaseGraphicsResources(vtkWindow *) override
void CanInteract(vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override
Position is displayed (slice) position.
vtkSmartPointer< vtkDiscretizableColorTransferFunction > LineColorMap
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.