[vtk-developers] isnan
Michael Halle
mhalle at bwh.harvard.edu
Sat Jan 13 18:27:40 EST 2007
Berk Geveci 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.
>
> Can you elaborate on what you mean by "significant performance hit"?
> Getting the range of an array is something that is done very often and
> is probably one of the bottlenecks in a few applications. I wouldn't
> want to impact that too much to support NaN. Too much is a little
> vague, of course. I would say 20% is too much, 5% is acceptable.
I plan to test.
In the mean time, how about the question of where to put the actual isnan function in VTK, hopefully in a way that introduces as little overhead as possible? Is vtkstd::isnan() the right place (since that's analogous to std::isnan() )?
Thanks.
--Mike
More information about the vtk-developers
mailing list