Slicer
5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
Modules
Loadable
Segmentations
EditorEffects
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h
Go to the documentation of this file.
1
/*=auto=========================================================================
2
3
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH)
4
All Rights Reserved.
5
6
See COPYRIGHT.txt
7
or http://www.slicer.org/copyright/copyright.txt for details.
8
9
Program: 3D Slicer
10
11
=========================================================================auto=*/
12
13
#ifndef __qSlicerSegmentationsEditorEffectsPythonQtDecorators_h
14
#define __qSlicerSegmentationsEditorEffectsPythonQtDecorators_h
15
16
// PythonQt includes
17
#include <PythonQt.h>
18
19
// Slicer includes
20
#include "
qSlicerSegmentEditorEffectFactory.h
"
21
22
#include "qSlicerSegmentationsEditorEffectsExport.h"
23
24
// NOTE:
25
//
26
// For decorators it is assumed that the methods will never be called
27
// with the self argument as nullptr. The self argument is the first argument
28
// for non-static methods.
29
//
30
31
class
qSlicerSegmentationsEditorEffectsPythonQtDecorators
:
public
QObject
32
{
33
Q_OBJECT
34
public
:
35
36
qSlicerSegmentationsEditorEffectsPythonQtDecorators
()
37
{
38
//PythonQt::self()->registerClass(&qSlicerSegmentEditorEffectFactory::staticMetaObject);
39
// Note: Use registerCPPClassForPythonQt to register pure Cpp classes
40
}
41
42
public
slots:
43
44
//----------------------------------------------------------------------------
45
// qSlicerSegmentEditorEffectFactory
46
47
//----------------------------------------------------------------------------
48
// static methods
49
50
//----------------------------------------------------------------------------
51
qSlicerSegmentEditorEffectFactory
*
static_qSlicerSegmentEditorEffectFactory_instance
()
52
{
53
return
qSlicerSegmentEditorEffectFactory::instance
();
54
}
55
56
//----------------------------------------------------------------------------
57
// instance methods
58
59
//----------------------------------------------------------------------------
60
bool
registerEffect
(
qSlicerSegmentEditorEffectFactory
* factory,
61
PythonQtPassOwnershipToCPP<qSlicerSegmentEditorAbstractEffect*> plugin)
62
{
63
return
factory->registerEffect(plugin);
64
}
65
};
66
67
//-----------------------------------------------------------------------------
68
void
initqSlicerSegmentationsEditorEffectsPythonQtDecorators
()
69
{
70
PythonQt::self()->addDecorators(
new
qSlicerSegmentationsEditorEffectsPythonQtDecorators
);
71
}
72
73
#endif
qSlicerSegmentEditorEffectFactory
Singleton class managing segment editor effect plugins.
Definition
qSlicerSegmentEditorEffectFactory.h:40
qSlicerSegmentEditorEffectFactory::instance
static Q_INVOKABLE qSlicerSegmentEditorEffectFactory * instance()
qSlicerSegmentationsEditorEffectsPythonQtDecorators
Definition
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h:32
qSlicerSegmentationsEditorEffectsPythonQtDecorators::qSlicerSegmentationsEditorEffectsPythonQtDecorators
qSlicerSegmentationsEditorEffectsPythonQtDecorators()
Definition
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h:36
qSlicerSegmentationsEditorEffectsPythonQtDecorators::static_qSlicerSegmentEditorEffectFactory_instance
qSlicerSegmentEditorEffectFactory * static_qSlicerSegmentEditorEffectFactory_instance()
Definition
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h:51
qSlicerSegmentationsEditorEffectsPythonQtDecorators::registerEffect
bool registerEffect(qSlicerSegmentEditorEffectFactory *factory, PythonQtPassOwnershipToCPP< qSlicerSegmentEditorAbstractEffect * > plugin)
Definition
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h:60
qSlicerSegmentEditorEffectFactory.h
initqSlicerSegmentationsEditorEffectsPythonQtDecorators
void initqSlicerSegmentationsEditorEffectsPythonQtDecorators()
Definition
qSlicerSegmentationsEditorEffectsPythonQtDecorators.h:68
Generated on Mon Jan 20 2025 03:24:51 for Slicer by
1.10.0