Commit 1b7c4845 authored by Edwin Carlinet's avatar Edwin Carlinet

Minor change to make pixel constructible from its image.

parent 5cd131c0
...@@ -93,6 +93,8 @@ namespace mln ...@@ -93,6 +93,8 @@ namespace mln
extended_by_value_image_pixel() = default; extended_by_value_image_pixel() = default;
extended_by_value_image_pixel(const extended_by_value_image_pixel&) = default; extended_by_value_image_pixel(const extended_by_value_image_pixel&) = default;
extended_by_value_image_pixel(Morpher* ima) : m_ima(ima) {}
extended_by_value_image_pixel(Morpher& ima, const Pix& pix) : m_ima(&ima), m_pix(pix) {} extended_by_value_image_pixel(Morpher& ima, const Pix& pix) : m_ima(&ima), m_pix(pix) {}
// Conversion non-const -> const pixel // Conversion non-const -> const pixel
......
...@@ -100,7 +100,7 @@ namespace mln ...@@ -100,7 +100,7 @@ namespace mln
ndimage_pixel() = default; ndimage_pixel() = default;
ndimage_pixel(image_type* ima, T* ptr) : details::ndimage_pixel_base<T, dim>(ptr), m_ima(ima) {} ndimage_pixel(image_type* ima, T* ptr = nullptr) : details::ndimage_pixel_base<T, dim>(ptr), m_ima(ima) {}
/// \brief Copy / copy conversion constructor /// \brief Copy / copy conversion constructor
template <class U, class J, typename = std::enable_if_t<std::is_convertible<U*, T*>::value>> template <class U, class J, typename = std::enable_if_t<std::is_convertible<U*, T*>::value>>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment