21#ifndef mia_template_combiner_filter_hh
22#define mia_template_combiner_filter_hh
32template <
typename Image>
37 const std::string& other_image_file,
bool reverse);
56 std::shared_ptr<TImageCombiner<Image>> m_combiner;
57 std::string m_other_image;
62template <
typename Image>
64 const std::string& other_image_file,
bool reverse):
66 m_other_image(other_image_file),
71template <
typename Image>
74 auto other_image = load_image<typename Image::Pointer>(m_other_image);
77 return m_combiner->combine(*other_image, image);
79 return m_combiner->combine(image, *other_image);
83template <
typename Image>
91 &IOHandler::instance()));
92 this->
add_parameter(
"reverse",
new CBoolParameter(m_reverse,
false,
"reverse the order in which the images passed to the combiner"));
95template <
typename Image>
101template <
typename Image>
104 return "Combine two images with the given combiner operator. if 'reverse' is set to false, the first "
105 "operator is the image passed through the filter pipeline, and the second image is loaded "
106 "from the file given with the 'image' parameter the moment the filter is run.";
void add_parameter(const std::string &name, CParameter *param)
Generic image filter plugin base.
Generic interface class to data filters.
Image Image
defines the image type handled by the image filter
the singleton that a plug-in handler really is
virtual const std::string do_get_descr() const
virtual TDataFilter< Image > * do_create() const
TImageCombinerFilterPlugin()
std::shared_ptr< TImageCombiner< Image > > m_combiner
TImageCombinerFilter(std::shared_ptr< TImageCombiner< Image > > combiner, const std::string &other_image_file, bool reverse)
std::string m_other_image
Image::Pointer do_filter(const Image &image) const
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define NS_MIA_END
conveniance define to end the mia namespace
CTParameter< bool > CBoolParameter
boolean parameter
CParameter * make_param(T &value, bool required, const char *descr)