Open pberkes opened 9 years ago
@jwiggins Do you remember why this is the case?
The reason is that volume data uses lots of GPU memory. For 8-bit function values, 256^3 is 16MB of memory, or 32MB for 16-bit. Additionally, the OpenGL driver on a computer might only accept power-of-two texture sizes.
512x512x256 might be a better maximum (64MB and 128MB, respectively). 512x512x512 seemed crazy Back in the Day™, but 256MB/512MB could actually be a possibility on contemporary high-end systems.
The smarter approach would be to ask the system what its limits are.
One caveat: VTK might have a hard-coded maximum. You should check.
Resampling to a fix number of point in depth seems wrong, as you get a different resolution depending on the depth range.
I agree. The implementation is naive because I wrote this code so I could look at my personal CT scan.
I think some amount of resampling will be necessary because of the hardware constraints involved. However, there are far better ways to achieve this than how its being done now (with a hard-coded size and aspect ratio).
We are resampling the volume data to 256 * 256 * 256 before visualization. That seems arbitrary, remove it unless we have a good reason for it.