[vtkusers] Using Interpolation and vtkImageReslice
David Gobbi
dgobbi at atamai.com
Wed Apr 18 21:25:41 EDT 2007
Hi Wagner,
The difference between displaying the slice and saving it is that
vtkImageActor will automatically adjust the display to correct
for the pixel aspect ratio.
Try adding this line to the code where vtkImageReslice is set up:
reslice->SetSpacing(spacing[0], spacing[0], spacing[0]);
If you do this, then when the image is interpolated, it will have
a pixel aspect ratio of 1:1.
- David
On 4/18/07, Wagner Sales <wsalles2003 at yahoo.com.br> wrote:
> Hi all,
>
> I'm using vtkImageReslice to extract and interpolate a slice from a DICOM
> dataset. To play with this, I was changed the
> VTK/Examples/ImageProcessing/ImageProcessing/Cxx/ImageSlicing.cxx
> to read my Dicom serie, display and write the result(vtkPNGWriter), was are
> shifted by the vtkImageShiftScale.
>
> On the screen, when I change the current slice, the image are correct
> displayed. But, on writer, something appears to be wrong ( image atached ).
>
> I was tested the interpolate modes, but the image aspect are the same, not
> like I can see on display. I need the exact result that's are displayed,
> since I'll use this image to view in another viewer wich will take the
> pixels, draw and display.
>
> Just to help, the code are atached too.
> Someone can help what's I'm doing wrong?
>
> Thks,
>
> Wagner Sales
>
>
> __________________________________________________
> Fale com seus amigos de graça com o novo Yahoo! Messenger
> http://br.messenger.yahoo.com/
> _______________________________________________
> 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:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
More information about the vtkusers
mailing list