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
qSlicerSubjectHierarchyTransformsPlugin.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6 Queen's University, Kingston, ON, Canada. All Rights Reserved.
7
8 See COPYRIGHT.txt
9 or http://www.slicer.org/copyright/copyright.txt for details.
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18 and was supported through the Applied Cancer Research Unit program of Cancer Care
19 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20
21==============================================================================*/
22
23#ifndef __qSlicerSubjectHierarchyTransformsPlugin_h
24#define __qSlicerSubjectHierarchyTransformsPlugin_h
25
26// SubjectHierarchy includes
28
29#include "qSlicerTransformsSubjectHierarchyPluginsExport.h"
30
31class qSlicerSubjectHierarchyTransformsPluginPrivate;
32
33class Q_SLICER_TRANSFORMS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyTransformsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
34{
35public:
36 Q_OBJECT
37
38public:
40 qSlicerSubjectHierarchyTransformsPlugin(QObject* parent = nullptr);
42
43public:
52 double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)const override;
53
56 bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override;
57
66 vtkMRMLNode* node,
67 vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const override;
68
75 double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
76
79 Q_INVOKABLE const QString roleForPlugin()const override;
80
83 QIcon icon(vtkIdType itemID) override;
84
86 QIcon visibilityIcon(int visible) override;
87
89 QString tooltip(vtkIdType itemID)const override;
90
93
96 void showContextMenuActionsForItem(vtkIdType itemID) override;
97
101
105 void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData) override;
106
110
113 void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
114
119
121 void showTransformContextMenuActionsForItem(vtkIdType itemID) override;
122
127
128protected slots:
130 void invert();
131
133 void identity();
134
140
144
146 virtual void onTransformInteractionInViewToggled(bool show);
150 virtual void onCreateNewTransform();
151
152protected:
153 QScopedPointer<qSlicerSubjectHierarchyTransformsPluginPrivate> d_ptr;
154
155private:
158};
159
160#endif
qSlicerSubjectHierarchyAbstractPlugin(QObject *parent=nullptr)
void identity()
Set transform to identity (only available for linear transforms)
Q_INVOKABLE const QString roleForPlugin() const override
qSlicerSubjectHierarchyTransformsPlugin(QObject *parent=nullptr)
bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override
double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) const override
QScopedPointer< qSlicerSubjectHierarchyTransformsPluginPrivate > d_ptr
void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override
QString tooltip(vtkIdType itemID) const override
Generate tooltip for a owned subject hierarchy item.
QIcon icon(vtkIdType itemID) override
virtual void onTransformInteractionInViewToggled(bool show)
void showTransformContextMenuActionsForItem(vtkIdType itemID) override
Show context menu actions valid for given subject hierarchy item.
void showContextMenuActionsForItem(vtkIdType itemID) override
QList< QAction * > itemContextMenuActions() const override
Get item context menu item actions to add to tree view.
QList< QAction * > visibilityContextMenuActions() const override
void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData) override
QIcon visibilityIcon(int visible) override
Get visibility icon for a visibility state.
double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const override
void toggleInteractionBox(bool)
Toggle interaction box.
QList< QAction * > transformContextMenuActions() const override
void resetCenterOfTransformationLocal()
Reset the center of transformation.
void invert()
Invert selected transform.
virtual void onRemoveTransformsFromBranchOfCurrentItem()
QList< QAction * > viewContextMenuActions() const override
virtual void onHardenTransformOnBranchOfCurrentItem()
double canOwnSubjectHierarchyItem(vtkIdType itemID) const override
Abstract Superclass for all specific types of MRML nodes.
QMap< QString, QVariant > QVariantMap