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
vtkSlicerPlaneWidget.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
16 and was supported through CANARIE's Research Software Program, Cancer
17 Care Ontario, OpenAnatomy, and Brigham and Women's Hospital through NIH grant R01MH112748.
18
19==============================================================================*/
20
28
29#ifndef vtkSlicerPlaneWidget_h
30#define vtkSlicerPlaneWidget_h
31
32#include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
34
36class vtkPolyData;
37class vtkIdList;
38
39class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkSlicerPlaneWidget : public vtkSlicerMarkupsWidget
40{
41public:
44
47
50
52 enum
53 {
55 WidgetStateSymmetricScale, // Scaling the plane without moving the center
57 };
58
60 enum
61 {
69 };
70
72 void CreateDefaultRepresentation(vtkMRMLMarkupsDisplayNode* markupsDisplayNode, vtkMRMLAbstractViewNode* viewNode, vtkRenderer* renderer) override;
73
74 bool PlacePoint(vtkMRMLInteractionEventData* eventData) override;
76
77 bool CanProcessInteractionEvent(vtkMRMLInteractionEventData* eventData, double& distance2) override;
88
89protected:
92
93private:
95 void operator=(const vtkSlicerPlaneWidget&) = delete;
96};
97
98#endif
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
bool ProcessUpdatePlaneFromViewNormal(vtkMRMLInteractionEventData *event)
void CreateDefaultRepresentation(vtkMRMLMarkupsDisplayNode *markupsDisplayNode, vtkMRMLAbstractViewNode *viewNode, vtkRenderer *renderer) override
Create the default widget representation and initializes the widget and representation.
static vtkSlicerPlaneWidget * New()
Instantiate this class.
bool ProcessPlaneMoveStart(vtkMRMLInteractionEventData *event)
bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) override
Process interaction event.
vtkSlicerMarkupsWidgetCreateInstanceMacro(vtkSlicerPlaneWidget)
Create instance of the markups widget.
bool ProcessMouseMove(vtkMRMLInteractionEventData *eventData) override
bool ProcessWidgetStopPlace(vtkMRMLInteractionEventData *eventData) override
bool ProcessPlaneSymmetricScale(vtkMRMLInteractionEventData *event)
virtual bool PlacePlaneNormal(vtkMRMLInteractionEventData *eventData)
bool ProcessPlaneMoveEnd(vtkMRMLInteractionEventData *event)
bool PlacePoint(vtkMRMLInteractionEventData *eventData) override
~vtkSlicerPlaneWidget() override
bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2) override
Return true if the widget can process the event.
bool ProcessWidgetSymmetricScaleStart(vtkMRMLInteractionEventData *eventData)
bool ProcessEndMouseDrag(vtkMRMLInteractionEventData *eventData) override
bool ProcessPlaneTranslate(vtkMRMLInteractionEventData *event)