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>
28 
30 
36 
42 
47 typedef std::shared_ptr<C2DFilter > P2DFilter;
48 
54 
59 struct EXPORT_2D C2DFilterPluginHandlerTestPath {
60  C2DFilterPluginHandlerTestPath();
61 };
63 
67 
71 inline P2DFilter produce_2dimage_filter(const char* descr)
72 {
73  return C2DFilterPluginHandler::instance().produce(descr);
74 }
75 
76 
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:
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 
158 
163 
165 
166 
167 #endif