[vtkusers] Error in vtkImageChangeInformation

Matthias Zangl zangl at ism-austria.at
Tue Jun 12 06:04:18 EDT 2001


Hello David,

I just wrote the script that uses the vtk-example-data.

---
from libVTKCommonPython import *
from libVTKGraphicsPython import *
from WindowLevelInterface import *

# Image Reader
reader = vtkImageReader()
reader.SetDataExtent(0,127,0,127,1,93)
reader.SetFilePrefix ("c:/source/vtk/data/headsq/half")
reader.SetDataSpacing(1.6,1.6,1.5)
reader.Update()

transform = vtkTransform()
transform.RotateX(90)
reslice = vtkImageReslice()
reslice.SetInput(reader.GetOutput())
reslice.SetResliceTransform(transform)
reslice.SetInterpolationModeToLinear()
reslice.SetOutputSpacing(1,1,1)

viewer = vtkImageViewer()
viewer.SetInput(reslice.GetOutput())
viewer.SetColorWindow(256)
viewer.SetColorLevel(127.5)
viewer.SetZSlice(0)
viewer.Render()

WindowLevelInterface(viewer)
---

When I remove the line transform.RotateX(90) it works. I just tried it with
different angles from 0 to 90 and the image suddenly disappears reaching 90
(a part of the image is still visible with degree 89). But it doesn't seem
to be a correct transformation anyways. I've created screenshots for you, so
that you can see the changes in the image. I placed them on our webserver
www.wsl.co.at/screenshots.

I checked out the most recent nightly build (sunday) and did the screenshots
with this build.

Thanks a lot,
Matthias

----- Original Message -----
From: "David Gobbi" <dgobbi at irus.rri.on.ca>
To: "Matthias Zangl" <zangl at ism-austria.at>
Cc: <vtkusers at public.kitware.com>
Sent: Monday, June 11, 2001 6:57 PM
Subject: Re: [vtkusers] Error in vtkImageChangeInformation


> This is quite a strange problem.  If you can write a script that
> produces the error that only uses the vtk example data, then mail
> it to me and I'll test it for you.
>
> Also, I made some changes to vtkImageChangeInformation a couple days
> ago that might fix the problem (but I can't be sure unless I can
> reproduce the errors myself).
>






More information about the vtkusers mailing list