[vtkusers] vtkImageReslice ERROR
Benoit Regrain
benoit.regrain at creatis.insa-lyon.fr
Thu Dec 2 04:09:19 EST 2004
Hi,
I'm using a nightly version of VTK from 29 oct. 2004
And when I'm using the vtkImageReslice on an image that have an anisotropic spacing
(example : 0.5, 1, 1), I obtain the following message (the source code is at the end of
the mail) :
ERROR: In C:\Creatis\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line 55
4
vtkStreamingDemandDrivenPipeline (0CF10460): The update extent specified in the
information for output port 0 on algorithm vtkImageReslice(0CF102D8) is 0 200 0
100 0 0, which is outside the whole extent 0 100 0 100 0 0.
Has anyone an idea to solve it ?
Cheers
Benoit Regrain
Source code to obtain the vtkImageReslice ERROR message :
-----------------------------------------------------------------------------------------------
from vtkpython import *
import sys
transform=vtkTransform()
transform.PostMultiply()
src=vtkImageEllipsoidSource()
src.SetOutputScalarType(5)
src.SetWholeExtent(0,100,0,100,0,100)
src.SetCenter(50,50,50)
src.SetRadius(50,40,30)
src.SetOutputScalarTypeToUnsignedChar()
info=vtkImageChangeInformation()
info.SetInput(src.GetOutput())
info.SetOutputSpacing(0.5,1,1)
reslice=vtkImageReslice()
reslice.SetInput(info.GetOutput())
reslice.SetOutputDimensionality(2)
reslice.SetResliceAxesDirectionCosines(1,0,0,0,1,0,0,0,1)
reslice.SetResliceAxesOrigin(0,0,0)
reslice.AutoCropOutputOn()
reslice.SetResliceTransform(transform)
print "Update 1"
transform.Identity()
transform.RotateWXYZ(90,0,1,0)
reslice.Update()
print "Update 2"
transform.Identity()
transform.RotateWXYZ(-90,1,0,0)
reslice.Update()
############# Here I obtain the ERROR message
sys.stdin.read(1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041202/6dc6e266/attachment.htm>
More information about the vtkusers
mailing list