Re: [boost] [GIL] integration between boost libraries (gil / multiarray)

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 ?

Hi there,
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.
You can have your own point structure or create some adapters for yourself. Have a look here: http://stlab.adobe.com/gil/html/structboost_1_1gil_1_1_point2_d_concept.html...
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 can second that. Unfortunately my time frame right now is very small. Do you have any specific ideas?
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 ?
There is a need for 3D regarding volumetric data. Not sure for more than that. A general c++ n-dimensional lib is very very hard if not impossible when performance plays a major role. I'm not aware of a such a C lib either. Regards, Christian
participants (2)
-
Christian Henning
-
fabien.castan@free.fr