[Insight-users] NaN Pixel Values

Robert Jason Harris rjharris at fas.harvard.edu
Tue Jan 29 09:45:46 EST 2008


Hello all,

I used ITK for a project this past summer, and I have since been reviewing 
what I have done.  It occurred to me that it might be useful to enter 
NaN values into some pixels of an image after it had been processed by a 
filtering algorithm that I wrote.  Is this defined in ITK, or will ITK 
break?  I have been looking for the use of NaN in ITK, and I've found 
hints but nothing definite.  I'm thinking of something like the following:

...
// process image and come up with criterion based
// on pixel values to determine which to set to NaN and
// which to keep at their current value

if ( pixel value < some value)
  image_iterator.SetPixel(NaN)
else
//do nothing.



Thanks for any help you can provide!

Robert Harris


More information about the Insight-users mailing list