[vtkusers] vtkXMLImageDataReader input extents error

Dean Inglis dean.inglis at camris.ca
Wed Mar 21 13:50:59 EDT 2007


if I clip a 3D image with vtkImageClip
by specifying the OutputWholeExtent,
the output image retains the input image's origin
but contains a subset of its extents.
If this is written to disk with vtkXMLImageDataWriter,
the xml header shows the clipped extents
and original origin.  Reading back the clipped file
with vtkXMLImageDataReader causes an error with

ERROR: In
d:\Developer\Sources\CVS\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx,
line 667
vtkStreamingDemandDrivenPipeline (0DA0A380): The update extent specified in
the information for output port 0 on algorithm vtkTrivialProducer(0DA189A0)
is 220 515 180 540 4 4, which is outside the whole extent 0 -1 0 -1 0 -1.


ERROR: In d:\Developer\Sources\CVS\VTK\Filtering\vtkImageData.cxx, line 1460
vtkImageData (071A96E8): GetScalarPointer: Pixel (220, 180, 4) not in
memory.
 Current extent= (0, -1, 0, -1, 0, -1)

Is this a bug with this writer/reader operation or
should I be checking the extents before writing to disk file
and possibly changing them and the image origin with
vtkImageChangeInformation?  BTW, vtkImageMetaImageWriter
avoids this problem since it writes out a shifted origin
and only specifies the dimensions of the image (i.e., no extents).

Dean



More information about the vtkusers mailing list