Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
34 class qSlicerSegmentEditorEffectFactoryCleanup;
35 
39 class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorEffectFactory : public QObject
40 {
41  Q_OBJECT
42 
43 public:
46  Q_INVOKABLE static qSlicerSegmentEditorEffectFactory* instance();
47 
49  static void setInstance(qSlicerSegmentEditorEffectFactory* instance);
50 
51 public:
54  Q_INVOKABLE bool registerEffect(qSlicerSegmentEditorAbstractEffect* effect);
55 
57  Q_INVOKABLE QList<qSlicerSegmentEditorAbstractEffect*> registeredEffects() { return m_RegisteredEffects; };
58 
63 
64 protected:
67 
68 public:
71  qSlicerSegmentEditorEffectFactory(QObject* parent=NULL);
72 
75 
76 private:
77  Q_DISABLE_COPY(qSlicerSegmentEditorEffectFactory);
78  friend class qSlicerSegmentEditorEffectFactoryCleanup;
79 
80 private:
82  static qSlicerSegmentEditorEffectFactory* m_Instance;
83 };
84 
85 #endif
Abstract class for segment editor effects.
Q_INVOKABLE QList< qSlicerSegmentEditorAbstractEffect * > registeredEffects()
Get list of registered effects.
Singleton class managing segment editor effect plugins.
QList< qSlicerSegmentEditorAbstractEffect * > m_RegisteredEffects
List of registered effect instances.