question about multi_array use
Hello, I would like to use the multi_array container to handle imaging data. The image data can be anything up to 8-dimensional (usually up to 4) and dimension information is found in records that accompany the binary data. Would it be possible to create an image class that takes the dimensionality and extents list as parameters, so that images of all dimensionalities can be treated as one class? For example, could the dimensionality be passed as a size_t argument? What I understand from the multi_array paper is that the extents list would only be required whan the array is initialised. Best wishes Alle Meije
Hello,
I might be wrong, but it seems the answer is "no you can't do that", because
the dimensionality is a template parameter multi_array
Hello,
I would like to use the multi_array container to handle imaging data. The image data can be anything up to 8-dimensional (usually up to 4) and dimension information is found in records that accompany the binary data.
Would it be possible to create an image class that takes the dimensionality and extents list as parameters, so that images of all dimensionalities can be treated as one class?
For example, could the dimensionality be passed as a size_t argument?
What I understand from the multi_array paper is that the extents list would only be required whan the array is initialised.
Best wishes Alle Meije _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Fri, Aug 7, 2009 at 2:04 PM, Anton Daneyko
Hello,
I might be wrong, but it seems the answer is "no you can't do that", because the dimensionality is a template parameter multi_array
and multi_array are different types. However I would like to hear some else' opinion as well. Regards, Anton Daneyko.
On Fri, Aug 7, 2009 at 3:48 PM, Alle Meije Wink
wrote: Hello,
I would like to use the multi_array container to handle imaging data. The image data can be anything up to 8-dimensional (usually up to 4) and dimension information is found in records that accompany the binary data.
Would it be possible to create an image class that takes the dimensionality and extents list as parameters, so that images of all dimensionalities can be treated as one class?
For example, could the dimensionality be passed as a size_t argument?
What I understand from the multi_array paper is that the extents list would only be required whan the array is initialised.
You could always just wrap up each of the possible dimensions in a struct that can handle the (de)serialization and everything too, perhaps use crtp to put identical functionality in a non-virtual base class.
participants (3)
-
Alle Meije Wink
-
Anton Daneyko
-
OvermindDL1