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