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>
54 std::shared_ptr<TImageCombiner<Image>> m_combiner;
55 std::string m_other_image;
60 template <
typename Image>
62 const std::string& other_image_file,
bool reverse):
64 m_other_image(other_image_file),
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.";