I have 3D data in file that can be displayed as vtkImageData. But I dont want to upload the whole file to the RAM because it weighs few Gigabytes. So I decided to display vertical slice from this file (see picture). This slice has arbitrary X and Y coordinates but Z points of this slice has constant values (from 0 to 1000 with step equal to 1) and the slice is vertical along Z dimension.
I’m wondering is there a class that allows to display this slice without setting x,y,z values for each node? So I could only set polyline in XY plane and z_start, z_step, n_z and the data array of course.
Another way is to use vtkStructuredGrid class but in this case I loose the perfomance… my gut tells me there should be more efficient way to do that
vtkImageReslice filter can extract oblique slices of a volume. It is enough if you load that extent that fully encloses your image slice. If you don’t have that much memory then you can load and process the data in multiple smaller sections.
However, if you have enough RAM to load the data then probably it is much simpler to just load the full data set. If loading time is an issue then don’t compress the data. Or, you can create 2x, 4x, 8x downsampled versions of your volume and show results from these lower-resolution volumes quickly, while processing the full-resolution volume in the background.