[vtkusers] vtkVolumeTextureMapper2D and vtkImageData->SetSpacing/Origin

Mark_Cartwright at veritasdgc.com Mark_Cartwright at veritasdgc.com
Tue Jan 29 18:08:07 EST 2002


Hello,


  I am seeing something with 4.0 (release candidate)'s VolumeTextureMapper
which confuses me a bit.

  In our application we have a vtkVolume, which we render with
vtkVolumeTextureMapper2D (OpenGL in our case).

  What I am confused about is whenever we use SetSpacing on our input
ImageData (single scalar unsigned short) something
goes wrong with opacity, there seems to be some problem in
vtkVolume::UpdateScalarOpacityforSampleSize.  Which
decides that all opacity values should be 1.0 for everything but the
tiniest values of originalOpacity.

  We have large values ( 200 - 5000 ) for DataSpacing, while
InternalSkipFactor (as per the debugger) remains at 1.0.

  I've noticed a mailing list message
(http://public.kitware.com/pipermail/vtkusers/2001-June/006617.html) that
hints at
changing aspect in ImageData as prefered to scaling, and another in the
same thread that relates the necessity to consider scaling in relation
to opacity. Our volume in not scaled, however the DataSpacing is
non-uniform for xyz.

  How does one compensate for this in user code, and if possible, will it
be necessary to have some idea of the
MajorAxis as in the case of vtkVolumeTextureMapper2D to accomplish this ?

  For a quick fix, I hacked UpdateScalarOpacityforSampleSize to leave
opacity untouched -- which gives good results.

  Thanks,

Mark








More information about the vtkusers mailing list