Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerMarkupsModule.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
18#ifndef __qSlicerMarkupsModule_h
19#define __qSlicerMarkupsModule_h
20
21// CTK includes
22#include <ctkVTKObject.h>
23
24// Slicer includes
26
27#include "qSlicerMarkupsModuleExport.h"
28
30class vtkMRMLScene;
32class qSlicerMarkupsModulePrivate;
34class vtkObject;
35
36class Q_SLICER_QTMODULES_MARKUPS_EXPORT qSlicerMarkupsModule : public qSlicerLoadableModule
37{
38 Q_OBJECT
39 QVTK_OBJECT;
40 Q_PLUGIN_METADATA(IID "org.slicer.modules.loadable.qSlicerLoadableModule/1.0");
41 Q_INTERFACES(qSlicerLoadableModule);
45
46public:
48 explicit qSlicerMarkupsModule(QObject* parent = nullptr);
50
51 qSlicerGetTitleMacro(tr("Markups"));
52
54 QString helpText() const override;
55
57 QString acknowledgementText() const override;
58
60 QStringList contributors() const override;
61
63 QIcon icon() const override;
64
66 QStringList categories() const override;
67
69 QStringList associatedNodeTypes() const override;
70
71 void setMRMLScene(vtkMRMLScene* scene) override;
72
75
79 Q_INVOKABLE bool autoShowToolBar();
80 Q_INVOKABLE bool isToolBarVisible();
82
85 Q_INVOKABLE static bool showMarkups(vtkMRMLMarkupsNode* markupsNode);
86
87protected:
89 void setup() override;
90
93
96
97public slots:
98 void setToolBarVisible(bool visible);
100 void setAutoShowToolBar(bool autoShow);
101 // void onNodeAddedEvent(vtkObject*, vtkObject*);
102
103protected:
104 QScopedPointer<qSlicerMarkupsModulePrivate> d_ptr;
105
106private:
107 Q_DECLARE_PRIVATE(qSlicerMarkupsModule);
108 Q_DISABLE_COPY(qSlicerMarkupsModule);
109};
110
111#endif
qSlicerLoadableModule(QObject *parent=nullptr)
bool toolBarVisible
Visibility of the markups toolbar.
QStringList associatedNodeTypes() const override
Specify editable node types.
void setToolBarVisible(bool visible)
Q_INVOKABLE bool isToolBarVisible()
QString acknowledgementText() const override
Return acknowledgements.
static void readDefaultMarkupsDisplaySettings(vtkMRMLMarkupsDisplayNode *markupsDisplayNode)
vtkMRMLAbstractLogic * createLogic() override
Create and return the logic associated to this module.
QStringList categories() const override
Return the categories for the module.
Q_INVOKABLE qMRMLMarkupsToolBar * toolBar()
void setup() override
Initialize the module. Register the volumes reader/writer.
static Q_INVOKABLE bool showMarkups(vtkMRMLMarkupsNode *markupsNode)
qSlicerAbstractModuleRepresentation * createWidgetRepresentation() override
Create and return the widget representation associated to this module.
QScopedPointer< qSlicerMarkupsModulePrivate > d_ptr
void setMRMLScene(vtkMRMLScene *scene) override
QStringList contributors() const override
Return the authors of the module.
static void writeDefaultMarkupsDisplaySettings(vtkMRMLMarkupsDisplayNode *markupsDisplayNode)
QString helpText() const override
Help to use the module.
void setAutoShowToolBar(bool autoShow)
Enables automatic showing markups toolbar when a new markups node is loaded.
qSlicerMarkupsModule(QObject *parent=nullptr)
qSlicerLoadableModule Superclass
qSlicerGetTitleMacro(tr("Markups"))
QIcon icon() const override
Return a custom icon for the module.
Superclass for MRML logic classes.
A set of MRML Nodes that supports serialization and undo/redo.