Medical Imaging Interaction Toolkit
2024.12.99-d991a09f
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Groups
Namespace List
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Variables
e
f
i
l
m
n
p
r
s
t
Typedefs
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
x
Enumerations
Enumerator
a
b
c
d
e
g
h
i
k
l
n
o
p
r
s
t
v
w
z
Class List
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
c
m
o
r
s
t
Related Functions
File List
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
m
o
p
q
r
s
t
u
v
x
Functions
_
e
h
m
o
q
s
u
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
i
m
o
p
q
r
s
u
v
x
Examples
Download
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
ExampleSegTool2D.h
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#ifndef ExampleSegTool2D_h
14
#define ExampleSegTool2D_h
15
16
#include <
mitkSegTool2D.h
>
17
#include <
MitkExampleModuleExports.h
>
18
19
namespace
us
20
{
21
class
ModuleResource;
22
}
23
24
// This is an example on how to add a segmentation tool to the standard
25
// MITK Segmentation Views. Here's the crucial points to make it work:
26
//
27
// * The name of the class MUST end in either SegTool2D or SegTool3D
28
//
29
// * Derive directly or indirectly from mitk::Tool, for example
30
// mitk::SegTool2D is a typical choice for 2d tools and
31
// mitk::AutoSegmentationTool is a typical choice for 3d tools.
32
//
33
// * Don't forget the MITK_TOOL_MACRO in the implementation file
34
//
35
// * You don't have to provide your own state machine if the state
36
// machines of the MitkSegmentation module are sufficient, but if
37
// you do, you MUST provide both, the state machine and an event
38
// config file, for example Paint.xml and PaintConfig.xml. The
39
// file name of the event config file MUST be "equal" to the file
40
// name of the state machine, suffixed by Config.xml instead of
41
// .xml. The file name is passed to the base class constructor
42
// without any extension, for example simply "Paint".
43
//
44
// * Look into ExampleSegTool2DGUI.h for an example of how to provide
45
// a custom tool GUI. The naming is important and basically "equals"
46
// the class name of the tool class, suffixed by GUI. Don't forget
47
// the MITK_TOOL_GUI_MACRO in the implementation file of the tool GUI.
48
//
49
// * Ensure that the module containing your tool is loaded at runtime
50
// before the MITK Segmentation Views are opened. Otherwise it cannot
51
// be found. One way is to call anything from that module in a plugin
52
// with eager activation policy. Such plugins are loaded very early
53
// in MITK. For an example of how this works, look into ExampleModule.h
54
// and the org_mitk_exampleplugin_eageractivation plugin.
55
56
class
MITKEXAMPLEMODULE_EXPORT
ExampleSegTool2D
:
public
mitk::SegTool2D
57
{
58
public
:
59
mitkClassMacro
(
ExampleSegTool2D
, SegTool2D)
60
itkFactorylessNewMacro(
Self
)
61
62
us::ModuleResource
GetIconResource
()
const override
;
63
const
char
*
GetName
()
const override
;
64
const
char
**
GetXPM
()
const override
;
65
66
protected
:
67
ExampleSegTool2D
();
68
~
ExampleSegTool2D
()
override
;
69
70
virtual
void
Paint(
mitk::StateMachineAction
* action,
mitk::InteractionEvent
* event);
71
72
private
:
73
void
ConnectActionsAndFunctions
()
override
;
74
};
75
76
#endif
mitk::InteractionEvent
Definition:
mitkInteractionEvent.h:26
mitk::SegTool2D::mitkClassMacro
mitkClassMacro(SegTool2D, Tool)
MITKEXAMPLEMODULE_EXPORT
#define MITKEXAMPLEMODULE_EXPORT
Definition:
MitkExampleModuleExports.h:15
us
Definition:
mitkAbstractFileReader.h:29
mitk::Tool::ConnectActionsAndFunctions
void ConnectActionsAndFunctions() override
mitk::EventStateMachine
**
Definition:
mitkEventStateMachine.h:111
mitk::SegTool2D
Abstract base class for segmentation tools.
Definition:
mitkSegTool2D.h:56
mitk::Tool::GetName
virtual const char * GetName() const =0
Returns the name of this tool. Make it short!
mitk::Tool::GetIconResource
virtual us::ModuleResource GetIconResource() const
Returns the tool button icon of the tool wrapped by a usModuleResource.
ExampleSegTool2D
Definition:
ExampleSegTool2D.h:56
mitkSegTool2D.h
us::ModuleResource
Definition:
usModuleResource.h:55
mitk::StateMachineAction
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Definition:
mitkStateMachineAction.h:30
mitk::Tool::GetXPM
virtual const char ** GetXPM() const =0
Returns an icon in the XPM format.
MitkExampleModuleExports.h
src
MITK-ProjectTemplate
Modules
ExampleModule
include
ExampleSegTool2D.h
Generated on Sat Mar 15 2025 02:13:13 for Medical Imaging Interaction Toolkit by
1.8.17