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-2017 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>
28 #include <mia/template/combiner.hh>
29 
31 
37 
43 
48 typedef std::shared_ptr<C2DFilter > P2DFilter;
49 
55 
59 
63 inline P2DFilter produce_2dimage_filter(const char* descr)
64 {
65  return C2DFilterPluginHandler::instance().produce(descr);
66 }
67 
68 
83 P2DImage EXPORT_2D run_filter_chain(P2DImage image, size_t nfilters, const char *filters[])
84  __attribute__((deprecated));
85 
94 P2DImage EXPORT_2D run_filter_chain(P2DImage image, const std::vector<const char *>& filters);
95 
103 P2DImage EXPORT_2D run_filter(const C2DImage& image, const char *filter);
104 
112 inline P2DImage EXPORT_2D run_filter(P2DImage image, const char *filter)
113 {
114  return run_filter(*image, filter);
115 }
116 
117 
125 typedef std::shared_ptr<C2DImageCombiner> P2DImageCombiner;
127 
128 
133 
135 public:
137 };
138 
139 
141 
142 
143 #endif
THandlerSingleton< TFactoryPluginHandler< C2DFilterPlugin > > C2DFilterPluginHandler
Definition: 2d/filter.hh:54
the singleton that a plug-in handler really is
Definition: handler.hh:157
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:119
TDataFilter< C2DImage > C2DFilter
Definition: 2d/filter.hh:36
TImageCombiner< C2DImage > C2DImageCombiner
2D Image combiner
Definition: 2d/filter.hh:124
P2DImage EXPORT_2D run_filter(const C2DImage &image, const char *filter)
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
static F::result_type filter(const F &f, const B &b)
Definition: core/filter.hh:250
#define EXPORT_2D
Definition: defines2d.hh:37
FACTORY_TRAIT(C2DImageCombinerPluginHandler)
TDataFilterPlugin< C2DImage > C2DFilterPlugin
Definition: 2d/filter.hh:42
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
Definition: factory.hh:49
std::shared_ptr< C2DImageCombiner > P2DImageCombiner
Definition: 2d/filter.hh:125
P2DFilter produce_2dimage_filter(const char *descr)
Definition: 2d/filter.hh:63
Generic image filter plugin base.
Definition: core/filter.hh:178
TFilterChain< C2DFilterPluginHandler > C2DImageFilterChain
Definition: 2d/filter.hh:73
P2DImage EXPORT_2D run_filter_chain(P2DImage image, size_t nfilters, const char *filters[]) __attribute__((deprecated))
create and use a chain of filters
Definition: filter_chain.hh:40
std::shared_ptr< C2DFilter > P2DFilter
Definition: 2d/filter.hh:48
static const T & instance()
This is the base class for 2D images that can hold generic pixel data.
Definition: 2d/image.hh:47
Generic interface class to data filters.
Definition: core/filter.hh:86
TFactory< C2DImageCombiner > C2DImageCombinerPlugin
Definition: 2d/filter.hh:126
THandlerSingleton< TFactoryPluginHandler< C2DImageCombinerPlugin > > C2DImageCombinerPluginHandler
Plugin handler for image combiner plugins.
Definition: 2d/filter.hh:131
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36