Q: Hello, I want to get an estimate of tissue volume from the PVE volumes in my minc directories. As far as I can tell, this requires that I:

1. Mask with the brain mask (using Perl):

$mask = $subject_dir.”/”.$sname.”/mask/”.$prefix.$sname.”_brain_mask.mnc”; `mincmath -mult ${volume} ${mask} ${temp_vol}`;

2. Resample with the inverse of the linear talairach transform:

$transform =
$subject_dir.”/”.$sname.”/transforms/linear/”.$prefix.$sname.”_t1_tal.xfm”;
`mincresample -transformation ${transform} -tfm_input_sampling
-invert_transformation ${temp_vol} ${temp_trans}`;
3. Calculate tissue volumes. For this I bin the volume into ranges of size 0.1, and multiply the resulting sum by the mid-point of the bin, adding two bins for [0:0.01] = 0 and [0.99:1] = 1. Then I sum the resulting values.

`mincstats -volume -quiet -range
0.0,0.01,0.01,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.5,0.5,0.6,0.6,0.7,0.7,0.8,0.8,0.9,0.9,0.99,0.99,1.0
$temp_trans} `;
My questions are:

1. Is this the correct way to apply the inverse transform? I get a weird result in that the mean native GM volume actually decreases with respect to that obtained from the original volumes in talairach space, but the mean native WM and CSF volumes increase. This is confusing, given that it is a linear transform, which I believe should deform in a globally proportional way.

2. Is there a better (more continuous) way to calculate volume than my step #3? The binning method essentially smooths the data, instead of simply summing the PVE values from all voxels.

Thanks!
http://www.bic.mni.mcgill.ca/pipermail/minc-users/2008-September/002170.html

A: Hrm, If I can grok what you are doing correctly why not just this?

minccalc -expression “(A[0] < 0.01) ? 0 : ((A[0] > 0.99) ? 1 : A[0])” ${temp_trans} ${temp_trans}.clamped mincstats -sum ${temp_trans}.clamped

At which stage you will have to multiply the result of the mincstats call by the volume of a single voxel and possibly include a mask if you want the volume of a particular chunk and/or your ${temp_trans} is not a single structure already.