2d/filter.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_2d_filter_hh
#define mia_2d_filter_hh
#include <mia/2d/image.hh>
#include <mia/core/factory.hh>
#include <mia/core/filter.hh>
#include <mia/template/filter_chain.hh>
#include <mia/template/combiner.hh>
NS_MIA_BEGIN
typedef TDataFilter<C2DImage> C2DFilter;
typedef TDataFilterPlugin<C2DImage> C2DFilterPlugin;
typedef std::shared_ptr<C2DFilter > P2DFilter;
typedef THandlerSingleton<TFactoryPluginHandler<C2DFilterPlugin>> C2DFilterPluginHandler;
FACTORY_TRAIT(C2DFilterPluginHandler);
inline P2DFilter produce_2dimage_filter(const char *descr)
{
return C2DFilterPluginHandler::instance().produce(descr);
}
typedef TFilterChain<C2DFilterPluginHandler> C2DImageFilterChain;
P2DImage EXPORT_2D run_filter_chain(P2DImage image, size_t nfilters, const char *filters[])
__attribute__((deprecated));
P2DImage EXPORT_2D run_filter_chain(P2DImage image, const std::vector<const char *>& filters);
P2DImage EXPORT_2D run_filter(const C2DImage& image, const char *filter);
inline P2DImage EXPORT_2D run_filter(P2DImage image, const char *filter)
{
return run_filter(*image, filter);
}
typedef TImageCombiner< C2DImage > C2DImageCombiner;
typedef std::shared_ptr<C2DImageCombiner> P2DImageCombiner;
typedef TFactory<C2DImageCombiner> C2DImageCombinerPlugin;
typedef THandlerSingleton<TFactoryPluginHandler<C2DImageCombinerPlugin>>
C2DImageCombinerPluginHandler;
FACTORY_TRAIT(C2DImageCombinerPluginHandler);
class EXPORT_2D C2DCombinerPluginHandlerTestPath
{
public:
C2DCombinerPluginHandlerTestPath();
};
NS_MIA_END
#endif
produce_2dimage_filter
P2DFilter produce_2dimage_filter(const char *descr)
Definition 2d/filter.hh:63
C2DImageCombinerPluginHandler
THandlerSingleton< TFactoryPluginHandler< C2DImageCombinerPlugin > > C2DImageCombinerPluginHandler
Plugin handler for image combiner plugins.
Definition 2d/filter.hh:131
P2DImageCombiner
std::shared_ptr< C2DImageCombiner > P2DImageCombiner
Definition 2d/filter.hh:125
C2DImageCombinerPlugin
TFactory< C2DImageCombiner > C2DImageCombinerPlugin
Definition 2d/filter.hh:126
image.hh
P2DImage
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition 2d/image.hh:120
C2DCombinerPluginHandlerTestPath::C2DCombinerPluginHandlerTestPath
C2DCombinerPluginHandlerTestPath()
C2DImage
This is the base class for 2D images that can hold generic pixel data.
Definition 2d/image.hh:48
TDataFilterPlugin
Generic image filter plugin base.
Definition core/filter.hh:186
TDataFilter
Generic interface class to data filters.
Definition core/filter.hh:87
TFactory
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
Definition factory.hh:51
TFilterChain
create and use a chain of filters
Definition filter_chain.hh:41
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
THandlerSingleton< TFactoryPluginHandler< C2DFilterPlugin > >::instance
static const TFactoryPluginHandler< C2DFilterPlugin > & instance()
TImageCombiner< C2DImage >
filter.hh
EXPORT_2D
#define EXPORT_2D
Definition defines2d.hh:37
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
factory.hh
filter_chain.hh
C2DImageFilterChain
TFilterChain< C2DFilterPluginHandler > C2DImageFilterChain
Definition 2d/filter.hh:73
run_filter_chain
P2DImage EXPORT_2D run_filter_chain(P2DImage image, size_t nfilters, const char *filters[]) __attribute__((deprecated))
P2DFilter
std::shared_ptr< C2DFilter > P2DFilter
Definition 2d/filter.hh:48
C2DImageCombiner
TImageCombiner< C2DImage > C2DImageCombiner
2D Image combiner
Definition 2d/filter.hh:124
filter
static F::result_type filter(const F &f, const B &b)
Definition core/filter.hh:258
run_filter
P2DImage EXPORT_2D run_filter(const C2DImage &image, const char *filter)
C2DFilterPluginHandler
THandlerSingleton< TFactoryPluginHandler< C2DFilterPlugin > > C2DFilterPluginHandler
Definition 2d/filter.hh:54
C2DFilterPlugin
TDataFilterPlugin< C2DImage > C2DFilterPlugin
Definition 2d/filter.hh:42
C2DFilter
TDataFilter< C2DImage > C2DFilter
Definition 2d/filter.hh:36
FACTORY_TRAIT
#define FACTORY_TRAIT(F)
Definition factory_trait.hh:69
combiner.hh