Yes.  My algorithm takes image views.  I'm just trying to use a const view for the source image.

Duh.  All I need is for the const view is ...

typedef gray_float_image_t::const_view_t gray_float_const_view_t;

With this, the unit test for my gray opening function with an unscaled float image now compiles and works fine.

Thanks for your help.


On Feb 17, 2011, at 02:03 PM, Lubomir Bourdev <lbourdev@adobe.com> wrote:


On Feb 17, 2011, at 2:01 PM, Lubomir Bourdev wrote:

> Hi Curtis,
>
> A GIL image is a container of pixels. It allocates and deallocates the pixels. As such it doesn't make sense to create a container type whose elements are constant.
> Instead of images you should try to pass to your containers image views. You can get a constant and a mutable view of a given image.
>

I meant to say, pass to your _algorithms_ image views.

> If you want a constant reference to an image, you can use "const gray_float_image_t&"
>
> Lubomir

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users