Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerSegmentEditorEffectFactory.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 __qSlicerSegmentEditorEffectFactory_h
24#define __qSlicerSegmentEditorEffectFactory_h
25
26// Segmentations Editor Effects includes
27#include "qSlicerSegmentationsEditorEffectsExport.h"
28
29// Qt includes
30#include <QObject>
31#include <QList>
32
34class qSlicerSegmentEditorEffectFactoryCleanup;
35
38class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorEffectFactory : public QObject
39{
40 Q_OBJECT
41
42public:
46
47public:
51
53 Q_INVOKABLE QList<qSlicerSegmentEditorAbstractEffect*> registeredEffects() { return m_RegisteredEffects; };
54
58 Q_INVOKABLE QList<qSlicerSegmentEditorAbstractEffect*> copyEffects(QList<qSlicerSegmentEditorAbstractEffect*>& effects);
59
60signals:
62 void effectRegistered(QString);
63
64protected:
66 QList<qSlicerSegmentEditorAbstractEffect*> m_RegisteredEffects;
67
68private:
70 static void cleanup();
71
72private:
73 qSlicerSegmentEditorEffectFactory(QObject* parent=nullptr);
75
77 friend class qSlicerSegmentEditorEffectFactoryCleanup;
78 friend class PythonQtWrapper_qSlicerSegmentEditorEffectFactory; // Allow Python wrapping without enabling direct instantiation
79
80private:
82 static qSlicerSegmentEditorEffectFactory* m_Instance;
83};
84
85#endif
Abstract class for segment editor effects.
Singleton class managing segment editor effect plugins.
Q_INVOKABLE QList< qSlicerSegmentEditorAbstractEffect * > copyEffects(QList< qSlicerSegmentEditorAbstractEffect * > &effects)
static Q_INVOKABLE qSlicerSegmentEditorEffectFactory * instance()
Q_INVOKABLE bool registerEffect(qSlicerSegmentEditorAbstractEffect *effect)
void effectRegistered(QString)
Signals that a new effect has been registered.
Q_INVOKABLE QList< qSlicerSegmentEditorAbstractEffect * > registeredEffects()
Get list of registered effects.
QList< qSlicerSegmentEditorAbstractEffect * > m_RegisteredEffects
List of registered effect instances.