[MINC-users] multiply with 0 not equal to 0?

Claude LEPAGE claude at bic.mni.mcgill.ca
Wed Mar 12 18:03:35 EDT 2008


Hi Mishkin,

Welcome to the world of minc ranges.

If you use xdisp, you will see the true voxel values, unlike register or
Display that will recast the ranges in 0..255. If you do so, you will see
that the background value is -0.0257254 - which happens to be the "zero"
range for your image in signed short (min=-91.32 to max=1364.35). In register,
the 0..255 zero bin has value -0.90810. Working in floats doesn't really 
help as the zero bin will be converted to a small value, not necessarily
zero. 

If you want something visually good but equally wrong, try this:

minccalc -unsigned -short -range 0 4095 -expre 'if(A[0]>0&&A[1]>0.5){out=A[0]}else{out=0}' 
signed_short_volume.mnc.gz unsigned_byte_mask.mnc.gz out.mnc

Now the zero range will show up as zero in register but the true value will
not be exactly zero (I get 0.0194111). 

Claude


More information about the MINC-users mailing list