[vtk-developers] Proposed changes to 3D texture mappers

Glen Lehmann glehmann at atamai.com
Tue Dec 19 12:32:26 EST 2006


Hi All,

Occasionally, on the vtkusers list there are requests to remove the
hard-coded limitations in VTK's 3D texture mappers.  We have removed
these limitations within Atamai and we find it very useful on newer
hardware.

If there are no objections, I would like to address this issue without
changing the default behaviour of the mapper:

vtkVolumeTextureMapper3D:

- new method SetMaximumTextureSize(int id, vtkIdType size)
  - vtkIdType MaximumTextureSize[2];
  - id = 0 will be used for 1-3 components (default = 128*256*256)
  - id = 1 will be used for 4 components (default = 128*128*128)
  - method will check for power-of-two

- new method SetMaximumSamplingDistance
  - default to -1.0 (unset)

- modify method UpdateColorLookup such that this->ActualSampleDistance
is less than or equal to this->MaximumSampleDistance

vtkOpenGLVolumeTextureMapper3D:

- modify IsTexureSizeSupported to use the values in MaximumTextureSize.

On a new Mac Pro with the ATI X1900 graphics card, setting
MaximumTexureSize[1] = 256*256*256, SampleDistance = 0.75, and
MaximumSampleDistance = 0.75 looks great and provides fast interactive
rendering.

Objections, comments, or concerns?

Glen



More information about the vtk-developers mailing list