Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
2d
2d/filter.hh
Go to the documentation of this file.
1
/* -*- mia-c++ -*-
2
*
3
* This file is part of MIA - a toolbox for medical image analysis
4
* Copyright (c) Leipzig, Madrid 1999-2013 Gert Wollny
5
*
6
* MIA is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
#ifndef mia_2d_filter_hh
22
#define mia_2d_filter_hh
23
24
#include <
mia/2d/image.hh
>
25
#include <
mia/core/factory.hh
>
26
#include <
mia/core/filter.hh
>
27
#include <
mia/template/filter_chain.hh
>
28
29
NS_MIA_BEGIN
30
35
typedef
TDataFilter<C2DImage>
C2DFilter
;
36
41
typedef
TDataFilterPlugin<C2DImage>
C2DFilterPlugin
;
42
47
typedef
std::shared_ptr<C2DFilter >
P2DFilter
;
48
53
typedef
THandlerSingleton<TFactoryPluginHandler<C2DFilterPlugin>
>
C2DFilterPluginHandler
;
54
59
struct
EXPORT_2D
C2DFilterPluginHandlerTestPath {
60
C2DFilterPluginHandlerTestPath();
61
};
63
65
FACTORY_TRAIT
(
C2DFilterPluginHandler
);
67
71
inline
P2DFilter
produce_2dimage_filter
(
const
char
* descr)
72
{
73
return
C2DFilterPluginHandler::instance
().produce(descr);
74
}
75
76
81
typedef
TFilterChain<C2DFilterPluginHandler>
C2DImageFilterChain
;
91
P2DImage
EXPORT_2D
run_filter_chain
(
P2DImage
image,
size_t
nfilters,
const
char
*filters[])
92
__attribute__((deprecated));
93
102
P2DImage
EXPORT_2D
run_filter_chain
(
P2DImage
image,
const
std::vector<const char *>& filters);
103
111
P2DImage
EXPORT_2D
run_filter
(
const
C2DImage
& image,
const
char
*
filter
);
112
120
inline
P2DImage
EXPORT_2D
run_filter
(
P2DImage
image,
const
char
*
filter
)
121
{
122
return
run_filter
(*image, filter);
123
}
124
125
132
class
EXPORT_2D
C2DImageCombiner
:
public
TFilter
< P2DImage > ,
133
public
CProductBase
{
134
public
:
136
typedef
C2DImage
plugin_data
;
138
typedef
combiner_type
plugin_type
;
139
140
virtual
~
C2DImageCombiner
();
148
result_type
combine(
const
C2DImage
& a,
const
C2DImage
& b)
const
;
149
private
:
150
virtual
result_type
do_combine(
const
C2DImage
& a,
const
C2DImage
& b)
const
= 0;
151
};
152
153
154
156
157
typedef
TFactory<C2DImageCombiner>
C2DImageCombinerPlugin
;
158
160
typedef
THandlerSingleton<TFactoryPluginHandler<C2DImageCombinerPlugin>
>
161
C2DImageCombinerPluginHandler
;
162
FACTORY_TRAIT
(
C2DImageCombinerPluginHandler
);
163
164
NS_MIA_END
165
166
167
#endif
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4