# Is there a class to show croocked slice from vtkImageData

**URL:** https://discourse.vtk.org/t/is-there-a-class-to-show-croocked-slice-from-vtkimagedata/3261
**Category:** Support
**Created:** [May 9, 2020, 7:08pm UTC](https://discourse.vtk.org/t/is-there-a-class-to-show-croocked-slice-from-vtkimagedata/3261 "2020-05-09T19:08:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kerim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kerim/32/1175_2.png) [@kerim](https://discourse.vtk.org/u/kerim)
#### Post date: [May 9, 2020, 7:08pm UTC](https://discourse.vtk.org/t/is-there-a-class-to-show-croocked-slice-from-vtkimagedata/3261/1 "2020-05-09T19:08:22Z")

</div>

Hi,

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 🙂

 ![1](https://discourse.vtk.org/uploads/default/original/2X/a/ab8907074e805335ec19e63886885928bc407ad9.png)

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 9, 2020, 8:30pm UTC](https://discourse.vtk.org/t/is-there-a-class-to-show-croocked-slice-from-vtkimagedata/3261/2 "2020-05-09T20:30:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kerim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kerim/32/1175_2.png) [@kerim](https://discourse.vtk.org/u/kerim)
#### Post date: [May 9, 2020, 9:12pm UTC](https://discourse.vtk.org/t/is-there-a-class-to-show-croocked-slice-from-vtkimagedata/3261/3 "2020-05-09T21:12:19Z")

</div>

I see what you say  
Ok, thank you. I’m going to explore `vtkImageReslice`
