decev wrote:
...the only public way I can find to access the voxel data is through getVoxel(). That would work fine for small Volumes, but for something large it won't work very well. Is there a way to access compressed blocks in a LargeVolume so that I can directly read and write the compressed blocks to/from disk? Thanks!
As I recall, getVoxel()/setVoxel() is currently the only correct way to get/set the data, and you are correct that this is probably sub-optimal from a performance point of view. I think there's some unnecessary compression/decompression going on there as well.
It might well make sense to expose a pointer to the underlying data, or to overload '<<' to allow steaming of all the data at once. But actually the internal ordering of the voxels could change in the future, for example to store them in Z-Curve order rather than linear order. A streaming operator might be able to handle this though.
Actually, the plan is top replace LargeVolume with a 'PagedVolume' which removes the two-level hierarchy (compressed and uncompressed blocks) and stores/pages only uncompressed blocks, leaving compression to the user. This should make everything a bit simpler and more direct.
Practically speaking, you might just want to expose a pointer to the raw data in the mean time.