[MINC-users] minccalc

Alexandre CARMEL-VEILLEUX acveilleux at mrs.mni.mcgill.ca
Sun May 6 23:02:34 EDT 2007


	There must be a better way, but what about:

(1) Extract the masked voxels into a new minc files where every non-masked
    voxel is zero. (I.e.: mincmath -mult). Binarize it (mincmath -seg) and
    then multiply it with X. I'm too lazy to check if -seg makes the first
    step redundant.

(2) Extract the non-masked voxels into a new minc files where every masked
    voxel is zero (I.e.: mincmath -mult) and then multiply all voxels by Y.

(3) mincmath -add the output of (1) and (2) above.

Alex

On Sun, May 06, 2007 at 10:49:30AM -0400, Abraham Gedamu wrote:
> Date: Sun, 6 May 2007 10:49:30 -0400
> From: "Abraham Gedamu" <abraham.gedamu at gmail.com>
> To: minc-users at bic.mni.mcgill.ca
> Subject: [MINC-users] minccalc
> 
> Hi,
> 
> I want to do something simple with minccalc.  I have an input image (in.mnc)
> and a mask (mask.mnc).  I want to set every voxel in the masked region of
> the input image to a value, X.  Every voxel that is not within the masked
> region gets assigned a value of Y*original voxel intensity.  I did the
> following:
> 
> minccalc -expression "A[1] >= 1 ? 100 : A[0]*5" in.mnc mask.mnc out.mnc
> 
> When I look at out.mnc, the voxel intensities in the image do not represent
> the values they should.
> 
> Any ideas?
> 
> Thanks,
> 
> Abe
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users


More information about the MINC-users mailing list