[vtk-developers] shift/scale for scalars again

David Gobbi dgobbi at irus.rri.on.ca
Wed Apr 11 15:59:52 EDT 2001


I've brought up this proposal in the past, but I though I'd try 
again just in case anyone is interested this time.

In VTK, when people use integer scalars they usually use the scalars
to represent a real quantity such as displacement, intensity, etc.
and it might be useful to have the scalars store a Shift and Scale
value to convert the integer value to a real value:

<real value> = <integer value> * Shift + Scale

This is particularly true in image analysis, where images are nearly
always stored in integer format but where the integer values correspond
to quantities such as density, intensity, CT number, etc.

For example, in the imaging pipeline even performing simple operations
such as 'exp' or 'log' on a 'short' image require a vtkImageCast to
rescale the the data and covert to float, then vtkImageMathematics,
followed by a vtkImageCast to rescale the data and convert it back to
short.  It would be nice if filters like vtkImageMathematics would
handle the rescaling automatically, according to Shift and Scale values
stored with the scalars in the vtkImageData.

Any opinions this time around?  Or at least a request for a more detailed
proposal?

This brings up another point... VTK is large and complex enough now that
there really should be a formal process for submission, review, and
archival of proposals that involve significant additions/modifications 
to VTK.  There have been many changes made to VTK in recent months
that I knew nothing about they appeared in CVS (not to point fingers,
but most such changes come from Kitware employees).  At the very least,
people should post a message to this list (or have someone post on
their behalf if they are shy) before making a big commit.

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario





More information about the vtk-developers mailing list