Commit db8cde18 authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Fix issue with backward iterator of ndimage.

	*  mln/core/image/ndimage_iter.hpp,
	*  mln/core/image/ndimage_pixel_iterator.hpp Fixed.
parent 119a8b87
......@@ -118,7 +118,7 @@ namespace mln
internal::strided_index_visitor<ndim>,
pixel_t, internal::deref_return_structure_policy> reverse_iterator;
typedef iterator const_reverse_iterator;
typedef reverse_iterator const_reverse_iterator;
ndimage_pixel_range(Image& ima)
......@@ -155,7 +155,7 @@ namespace mln
);
}
reverse_iterator riter()
reverse_iterator riter() const
{
typename Image::point_type pmin = ima_->domain().pmin;
typename Image::point_type pmax = ima_->domain().pmax;
......
......@@ -61,9 +61,9 @@ struct ndimage_pixel_range
{
Image::point_type pmin = ima_->domain().pmin;
Image::point_type pmax = ima_->domain().pmax;
return iterator(pixel_t(ima_),
internal::make_point_visitor(pmax - pmin),
internal::strided_pointer_value_visitor<ndim>(ima->last_, strides.begin()));
return reverse_iterator(pixel_t(ima_),
internal::make_point_visitor(pmax - pmin),
internal::strided_pointer_value_visitor<ndim>(ima->last_, strides.begin()));
}
private:
......
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