[vtkusers] how to show 4D?

Emiliano Beronich emiliano at veccsa.com
Wed Dec 15 09:54:54 EST 2004

Hi Kingaza,

yes, the application is running very well. I'm using the first approach. 
If you had an image of 64x64x64x8, then the vtkImageData would have an 
extent of 64x64x512. Suppose the order in the 3rd dimension is z-t. For 
getting a slice you just need to calculate

ZSlice = z + t * 8;

In this case you don't need any special class, just select the right 
ZSlice in the vtkImageMapper. However if you want to display another 
pair of axes (X-Z or Y-Z) you need special classes. Using only vtk 
requires your own transformations classes (that work with 
vtkImageReslice), using itk requires stacking the 3rd and 4th dimension 
along a the 3rd. I prefer the last one.
Do you need to show a different pair of axes? If you need it I could 
send the classes I have developed to you.


kingaza at gmail.com wrote:
> thx for your help
> it seems a good appoach.
> have you secceeded in it?
> regards,
> kingaza
> On Tue, 14 Dec 2004 12:26:38 -0300, Emiliano Beronich
> <emiliano at veccsa.com> wrote:
>>Hi kingaza,
>>Do you want to show 4D-images?
>>vtk supports only 3D images. If you want to show the 4th dimension you
>>need to implement some trick.
>>You could try one of these solutions:
>>-stacking the 3rd and 4th dimension in the same dimension (the 3rd).
>>-depending of what you need exactly, another solution could be reading
>>the image under itk, extracting a 3D-volume and then exporting to vtk.
>>With this approach you lose some pipeline funcionality.
>>I have an application where I am showing 4D images. I read and process
>>the image on itk and I use vtk for visualization. I have developed some
>>classes to stack the 4th dimension in the 3rd before exporting to vtk,
>>preserving the pipeline update when a different t is needed.
>>kingaza at gmail.com wrote:
>>>hi all,
>>>i am learning vtk, and now i want to show 4D (3D + t),  how can i implement it?
>>>could you give me some example?
>>>This is the private VTK discussion list.
>>>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list