@@ -45,15 +45,21 @@ public class IntensityMeasures3D implements PlugIn{
4545 static int labelsIndex = 1 ;
4646
4747
48- static String [] measureLabels = new String []{ "Mean" , "StdDev" , "Max" ,
49- "Min" , "Median" , "Mode" , "Skewness" , "Kurtosis" ,
50- "NumberOfVoxels" , "Volume" , "NeighborsMean" , "NeighborsStdDev" ,
51- "NeighborsMax" , "NeighborsMin" , "NeighborsMedian" ,
52- "NeighborsMode" , "NeighborsSkewness" , "NeighborsKurtosis" };
48+ static String [] measureLabels = new String []{
49+ "Mean" , "StdDev" ,
50+ "Max" , "Min" ,
51+ "Median" , "Mode" ,
52+ "Skewness" , "Kurtosis" ,
53+ "NumberOfVoxels" , "Volume" ,
54+ "NeighborsMean" , "NeighborsStdDev" ,
55+ "NeighborsMax" , "NeighborsMin" ,
56+ "NeighborsMedian" , "NeighborsMode" ,
57+ "NeighborsSkewness" , "NeighborsKurtosis" ,
58+ "CenterOfMass" };
5359
5460 static boolean [] measureStates = new boolean []{ true , true , true , true ,
5561 true , true , true , true , true , true , true , true , true , true , true ,
56- true , true , true };
62+ true , true , true , false };
5763
5864 @ Override
5965 public void run (String arg )
@@ -284,6 +290,14 @@ public void run(String arg)
284290 Tables .appendColumns (table , im .getNeighborsKurtosis ());
285291 calculated ++;
286292 }
293+
294+ if (measureStates [18 ]) // center of mass
295+ {
296+ IJ .showStatus ("Calculating center of mass..." );
297+ IJ .showProgress (calculated , numMeasures );
298+ Tables .appendColumns (table , IntensityMeasures .getCenterOfMassInPixels (inputImage , labelImage ));
299+ calculated ++;
300+ }
287301 IJ .showStatus ("Done" );
288302 IJ .showProgress (calculated , numMeasures );
289303
0 commit comments