Q:Hi, I have some parameter maps that may contain ‘inf’ values. I noticed they fail to render in Display and thought of writing a wrapper that replaces inf with the highest non-inf value in the dataset - just for display purposes. I wanted to use mincstats -max to determine presence of infs, but it does not identify inf as the max value - is there another way to tease out these inf voxels? Should mincmath handle infs? I don’t seem to be able to find them using -eq inf either.

A:I tried

minccalc -clobber -illegal_value 1 -expression “A[0]*0” TTPfit.mnc test.mnc

hoping that all 0*inf operations would result in 1 in the resulting image (usually this would be a NaN). the resulting image i ranged 0–0 I also tried a few other variants but either end up with a 0-inf or 0–0 ranged image.

Finally, minccalc -clobber -expression “A[0]>100” TTPfit.mnc test.mnc

Works because 100 is the largest non-infinite value - I guess this opens a way to do what I want be first determining max and then doing the above.

If there is a smarter way I’d like to know.