Re: Infinity values
Posted by Francis Burton-2 on
URL: http://imagej.273.s1.nabble.com/Infinity-values-tp3686956p3686958.html
Many thanks to Ben, Wayne and Michael for their answers. This really is
a
most responsive and helpful forum.
I followed Ben's suggestion and modified the plugin source. I added a
field
to allow the user to specify which value should be used to represent the
ratio when the divisor is 0, with the default value taken from
preferences:
import ij.process.*;
...
// Use "divide by zero" value from Edit/Options/Misc... as default
dz = (float)FloatBlitter.divideByZeroValue;
So I didn't use Ben's macro in the end, though it might prove useful to
someone else. Everything from "h = getHeight();" onwards can presumably
be
replaced with
changeValues(targetValue, targetValue, repValue);
as per Wayne's suggestion.
Francis