[vtkusers] vtkImageResample causes crash?

Charles Boivin okeovtk at gmail.com
Mon Jul 4 11:58:41 EDT 2005


Hello all,

I have been having some problems with displaying volumes from
vtkImageData structures that contain multiple (independent) scalars.
>From a previous message, I have found out that
vtkOpenGLVolumeTextureMapper2D does not support multiple scalar input
(I had been using this successfully with vtkImageData structures
containing only one scalar).

I have decided to then always pass a vtkImageData with a single scalar
in it to the texture mapper, so I added a filter in the pipeline
upstream of the texture mapper to handle this. This, surprisingly, was
crashing. After much debugging, I have been able to find that it is
vtkImageResample that causes the crash.

I am using a LOD volume, and have 2 texture mappers -- a low
resolution one and a high  resolution one. The high resolution one
gets the 'full' image data, the low resolution one gets the
'resampled' data. I have tried removing the vtkImageResample class
from the pipeline (still having 2 mappers, but basically both having
the same input), and that works fine.

Turning debugging on in vtkImageResample yields the following output:
...
Debug: In \Vtk44\Vtk\Imaging\vtkImageResample.cxx, line 104
vtkImageResample (0E90C888): Returning magnification factor 0.25 for axis 0


Debug: In \Vtk44\Vtk\Imaging\vtkImageResample.cxx, line 104
vtkImageResample (0E90C888): Returning magnification factor 0.25 for axis 1


Debug: In \Vtk44\Vtk\Imaging\vtkImageResample.cxx, line 104
vtkImageResample (0E90C888): Returning magnification factor 0.25 for axis 2


Debug: In \Vtk44\Vtk\Filtering\vtkImageToImageFilter.cxx, line 228
vtkImageResample (0E90C888): SplitExtent: ( 0, 31, 0, 15, 0, 15), 0 of 2


Debug: In \Vtk44\Vtk\Filtering\vtkImageToImageFilter.cxx, line 264
vtkImageResample (0E90C888):   Split Piece: ( 0, 31, 0, 15, 0, 7)


Debug: In \Vtk44\Vtk\Imaging\vtkImageReslice.cxx, line 1732
vtkImageResample (0E90C888): Execute: inData = 18A5AC48, outData = 0EA24688


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 179
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning Mirror of 0


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 172
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning Wrap of 0


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 138
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
ResliceTransform address 00000000


Debug: In \Vtk44\Vtk\Filtering\vtkImageToImageFilter.cxx, line 228
vtkImageResample (0E90C888): SplitExtent: ( 0, 31, 0, 15, 0, 15), 1 of 2


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 204
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
BackgroundColor pointer 0E90C980


Debug: In \Vtk44\Vtk\Filtering\vtkImageToImageFilter.cxx, line 264
vtkImageResample (0E90C888):   Split Piece: ( 0, 31, 0, 15, 8, 15)


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 204
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
BackgroundColor pointer 0E90C980


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 179
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning Mirror of 0


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 172
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning Wrap of 0


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 138
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
ResliceTransform address 00000000


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 89
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
ResliceAxes address 00000000


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 204
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
BackgroundColor pointer 0E90C980


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 204
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
BackgroundColor pointer 0E90C980


Debug: In d:\vtk44\vtk\imaging\vtkImageReslice.h, line 185
vtkImageResample (0E90C888): vtkImageResample (0E90C888): returning
InterpolationMode of 1
...

Of particular interest are the 'returning ResliceTransform address
00000000' and 'returning ResliceAxes address 00000000' messages..
could that be a problem?

I am using VTK 4.4. Thanks in advance for your help.

Charles Boivin



More information about the vtkusers mailing list