21 #ifndef mia_template_combiner_filter_hh
22 #define mia_template_combiner_filter_hh
32 template <
typename Image>
37 const std::string& other_image_file,
bool reverse);
48 template <
class Image>
56 std::shared_ptr<TImageCombiner<Image>> m_combiner;
57 std::string m_other_image;
62 template <
typename Image>
64 const std::string& other_image_file,
bool reverse):
66 m_other_image(other_image_file),
71 template <
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);
83 template <
typename Image>
90 this->
add_parameter(
"image",
new CStringParameter(m_other_image, CCmdOptionFlags::required_input,
"second image that is needed in the combiner",
91 &IOHandler::instance()));
92 this->
add_parameter(
"reverse",
new CBoolParameter(m_reverse,
false,
"reverse the order in which the images passed to the combiner"));
95 template <
typename Image>
101 template <
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.";