[MINC-users] Masking voxels
Kelvin Mok
mok at bic.mni.mcgill.ca
Fri Jul 10 14:09:50 EDT 2009
Michael Alexander Yee wrote:
> Hello!
>
> Is it possible to mask any voxel readings that are below a minimum desired
> reading? I have used:
>
> mincmath name.mnc -segment -const2 40 90000 nameseg.mnc
>
> But it turns all readings into either 0 or 1. Is there a command to use so
> that voxel readings within the range will keep their values instead of
> changing to 1?
>
> Thanks,
> Michael
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
Hi Michael,
You can use minccalc and specify your rule with the switch "-expression"....
minccalc -expression "if (A[0]<N){out=0;}else{out=A[0];}" name.mnc
name_thresholded.mnc
where N = your desired threshold value
Best,
Kelvin
--
Kelvin Mok
Dept. Neurology and Neurosurgery
McConnell Brain Imaging Centre
Montreal Neurological Institute, McGill University
More information about the MINC-users
mailing list