Stack RGB measure with label

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stack RGB measure with label

Manuel Costa
Hi!

I have joined different scripts in order to get the RGB values of a image
stack and got this:

// Measure Stack
//
// This macro measure all the slices in a stack.

 macro "Measure Stack" {
       for (n=1; n<=nSlices; n++) {
          setSlice(n);

            requires("1.35b");
  if (bitDepth!=24)
     exit("This macro requires an RGB image");

 
  setRGBWeights(1, 0, 0);
  run("Measure");
  setResult("Label", nResults-1, "Red");
 }

for (n=1; n<=nSlices; n++) {
          setSlice(n);

   setRGBWeights(0, 1, 0);
  run("Measure");
  setResult("Label", nResults-1, "Green");

}

for (n=1; n<=nSlices; n++) {
          setSlice(n);

  setRGBWeights(0, 0, 1);
  run("Measure");
  setResult("Label", nResults-1, "Blue");

}


However, I could not manage to find a way of displaying the name of each
file analysed followed by the parameter measured (blue, red and green) in
the label column. Is there any way to do that?

Thank you very much!