[vtk-developers] isnan
Michael Halle
mhalle at bwh.harvard.edu
Sat Jan 13 09:31:39 EST 2007
Goodwin Lawlor wrote:
> Michael Halle wrote:
>> I've got a dataset that uses NaN as a data value to indicate invalid
>> pixels. A couple of places in VTK, such as vtkDataArray's GetRange()
>> are fooled by this value. A small test for NaN pixels would fix this
>> problem, and native isnan() and std::isnan() don't seem to introduce
>> significant preformance hits. (vtkDataArray could also possibly keep
>> track of the existence of NaN values to help other classes know how to
>> deal with them).
>
> Yeah - vtkCurvatures could do with using NaN as a data value. How do NaN
> values get mapped by the LUT though?
Maybe these methods on vtkScalarsToColors:
SetInvalidValue() - defaults to NaN, but could be set to something else.
SetColorForInvalidValue()
SetOpacityForInvalidValue()
If the color or opacity aren't set, behavior is undefined, I guess, and optimized filter could ignore the test for invalidity.
--Mike
More information about the vtk-developers
mailing list