[vtkusers] vtkXMLImageDataWriter/Reader vtkMetaImageWriter/Reader errors with 2D images
dean.inglis at camris.ca
dean.inglis at camris.ca
Thu Nov 22 10:47:16 EST 2007
I am getting fatal errors/program crashes when trying to read back a 2D unsigned char image stored in MetaIO (.mhd/.mha - vtkMetaImageWriter/Reader) or XML format (.vti - vtkXMLImageDataWriter/Reader). The same data stores/reads fine in TIFF format.
I tried reading one of the ITK files (Insight/Testing/Data/Input/foot.mha and get the following
errors:
ERROR: In d:\developer\sources\vtk\common\vtkDataArrayTemplate.txx, line 137
vtkUnsignedCharArray (07AE6978): Unable to allocate 2133131264 elements of size 1 bytes.
ERROR: In D:\Developer\Sources\VTKDLI\Widgets\vtkImageScene.cxx, line 855
vtkImageScene (034EB010): no input to initialize w/l
ERROR: In D:\Developer\Sources\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line 698
vtkStreamingDemandDrivenPipeline (07AE6D98): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(07B51350) is 0 255 0 255 41674812 41674812, which is outside the whole extent 0 255 0 255 128870680 41674812.
ERROR: In D:\Developer\Sources\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line 698
vtkStreamingDemandDrivenPipeline (07AE6D98): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(07B51350) is 0 255 0 255 41674812 41674812, which is outside the whole extent 0 255 0 255 128870680 41674812.
ERROR: In D:\Developer\Sources\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line 698
vtkStreamingDemandDrivenPipeline (07AE6D98): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(07B51350) is 0 255 0 255 41674812 41674812, which is outside the whole extent 0 255 0 255 128870680 41674812.
ERROR: In D:\Developer\Sources\VTK\Filtering\vtkImageData.cxx, line 1460
vtkImageData (034A7C70): GetScalarPointer: Pixel (0, 0, 41674812) not in memory.
Current extent= (0, 255, 0, 255, 128870680, 41674812)
ERROR: In D:\Developer\Sources\VTK\Filtering\vtkImageData.cxx, line 1460
vtkImageData (034A7C70): GetScalarPointer: Pixel (0, 128, 41674812) not in memory.
Current extent= (0, 255, 0, 255, 128870680, 41674812)
Any idea why the z extents are not initialized correctly for this image?
I don't have any problems reading in 3D data stored in MetaIO format.
Build is latest VTK cvs, Window Vista 32 bit, Visual Studio 2005.
Dean
contents of foot.mha:
NDims = 2
DimSize = 256 256
ElementType = MET_UCHAR
ElementSpacing = 1.0 1.0 1.0
ElementByteOrderMSB = False
ElementDataFile = foot.raw
More information about the vtkusers
mailing list