|
Boost : |
Subject: Re: [boost] [GIL] integration between boost libraries (gil / multiarray)
From: fabien.castan_at_[hidden]
Date: 2010-06-23 07:08:25
>> For now view concepts from gil and multi_array are not compatible I
>> would say. Hopefully in the future we can agree on 2D and 3D
>> container and container view concepts that should be implemented by
>> all libs who need such functionality. In the same we way boost needs
>> a common point2D structure. ;-)
>
>I'm not sure why it should be true that we need a common point2D. But
>then, maybe I'm missing something.
It's not a good thing that some computation functions become dependant to gil only for a point class.
To compute a geometric transformation, I cannot directly get a gil point, multiply it by a scalar and return it, because this operator is not define in gil...
Or more generally I cannot directly compute a product with an uBlas matrix. Maybe some cast operators and constructors from/to bounded_vector can be suffiscient to have interoperability.
>> For example, inside an algorithm I need to maintain a data structure for each pixel. So I would like to create an array of MyCustomStruct. I can use gil to do that but I need to have a notion of colorspace and operators between
>> pixels, which have no sense in this particular case. But subsampled_view, cache_locator, etc. have a sense.
>
>In theory you're right. But both libraries were developed by different
>people at different times without having the need to have compatible
>concepts.
Yes I understand, I discuss possible improvements. I think there is a need to have compatible concepts.
>> I have only one criticism: the integration with other boost libraries and firstly with multiarray.
>> Because manipulating an image consists of manipulating an array of pixels. Many gil's operations are not present in multiarray:
>> flip_view, subsampled_view, subimage_view, n_channel_view, x_iterator, y_iterator, xy_locator, cache_locator, plannar or interleaved arrays, virtual views, static_for_each, ...
>
>Multi_array is for N-dimensional arrays. GIL only makes sense for 2D
>right now.
A simple solution can be to implement those gil ideas, which can be applied to N-dimensional, in multi-array to propose the same fonctionnalities ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk