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
vtkMRMLTransformHandleWidget.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
27
28#ifndef vtkMRMLTransformHandleWidget_h
29#define vtkMRMLTransformHandleWidget_h
30
31#include "vtkSlicerTransformsModuleMRMLDisplayableManagerExport.h"
32
34
35class vtkIdList;
36class vtkMatrix4x4;
44class vtkPolyData;
45class vtkTransform;
46
47class VTK_SLICER_TRANSFORMS_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT vtkMRMLTransformHandleWidget
49{
50public:
53
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61 enum
62 {
64 };
65
66 enum
67 {
70 };
71
73 virtual void CreateDefaultRepresentation(vtkMRMLTransformDisplayNode* displayNode, vtkMRMLAbstractViewNode* viewNode, vtkRenderer* renderer);
74
77
78 bool CanProcessInteractionEvent(vtkMRMLInteractionEventData* eventData, double& distance2) override;
80
81protected:
84
90
91 virtual void TranslateTransformCenter(double eventPos[2]);
92
93 void ApplyTransform(vtkTransform* transform) override;
94
96
97private:
99 void operator=(const vtkMRMLTransformHandleWidget&) = delete;
100};
101
102#endif
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Abstract Superclass for all specific types of MRML nodes.
MRML node to represent display properties for transforms visualization in the slice and 3D viewers.
virtual void TranslateTransformCenter(double eventPos[2])
virtual void CreateDefaultRepresentation(vtkMRMLTransformDisplayNode *displayNode, vtkMRMLAbstractViewNode *viewNode, vtkRenderer *renderer)
Create the default widget representation and initializes the widget and representation.
bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2) override
Return true if the widget can process the event.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLNode * GetMRMLNode() override
~vtkMRMLTransformHandleWidget() override
bool ProcessMouseMove(vtkMRMLInteractionEventData *eventData) override
bool ProcessWidgetMenu(vtkMRMLInteractionEventData *eventData) override
@ WidgetStateTranslateTransformCenter
mouse move transforms the center of transformation
bool ProcessEndMouseDrag(vtkMRMLInteractionEventData *eventData) override
virtual vtkMRMLTransformDisplayNode * GetDisplayNode()
virtual bool ProcessWidgetTranslateTransformCenterStart(vtkMRMLInteractionEventData *eventData)
virtual vtkMRMLTransformNode * GetTransformNode()
void ApplyTransform(vtkTransform *transform) override
static vtkMRMLTransformHandleWidget * New()
Instantiate this class.
bool ProcessJumpCursor(vtkMRMLInteractionEventData *eventData) override
bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) override
Process interaction event.
MRML node for representing a transformation between this node space and a parent node space.