[vtkusers] vtkImageReslice

Frank Boettger f.boettger at zeiss.de
Mon Sep 18 03:37:23 EDT 2000


Hi everybody,

i'm doing volume rendering of (confocal) microscopy datasets. I want to get single slices with arbitrary orientation from within  my volume - here i came across vtkImageReslice. Two questions about that one:

1. For interactive rendering, i just use the default way with vtkWin32RenderWindowInteractor, which positions the
camera. Now, i want to reslice my volume to get a slice which is always parallel to the current viewing plane. For that,
i need to get the viewing transformation matrix from the camera, invert it, and to call  vtkImageReslice->SetResliceAxes to ( SetResliceTransform isn't really necessary for that???) with it, right? But i'm not sure what camera matrix i have to use here:
the vtkCamera->GetViewTransformMatrix (),  vtkCamera->GetPerspectiveTransformMatrix or  vtkCamera->GetCompositePerspectiveTransformMatrix  ? Then i can access the single pixel values with vtkImageReslice->GetOutput()->GetScalarPointer or vtkImageReslice->GetOutput()->GetScalarPointerForExtent. I understand the GetScalarPointer, but what's GetScalarPointerForExtent doing ?

2. Since i'm using volume rendering, i specify a gradient opacity, scalar opacity and a color transfer function. Those functions greatly change the appearance of the rendered volume - but with accessing a slice through vtkImageReslice, i only access the 'original' data. What do i have to do to apply the same transfer functions to my slice ?


Thanks in advance,

Frank




More information about the vtkusers mailing list