Display Labels in Results Table - Color Pixel Plugin

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

Display Labels in Results Table - Color Pixel Plugin

mariana
Hi all,

I have the task below to run using the Color Pixel Counter Plugin (after
opening my image):

run("RGB Color");
run("Color Pixel Counter", "color=Red cells=20 pixels=0.2100 minimum=255
display_0 display_1");
run("Color Pixel Counter", "color=Green cells=20 pixels=0.2100 minimum=255
display_0 display_1");
run("Color Pixel Counter", "color=Blue cells=20 pixels=0.2100 minimum=255
display_0 display_1");

However, I have been struggling in displaying the name of my original file
in the first column of the Results Table (what I guess would be the place
for my "labels"):
  Color Color Pixels Total Pixels Particles % Color
1 Red 1173093 1228800 5586157 95
2 Green 48230 1228800 229667 4
3 Blue 7477 1228800 35605 1

Instead of the output displaying 1, 2 and 3, I would like it to display the
name of my file. Could I apply the method for batch processing?

Any assistance would be very welcome.

Kind regards,
Mariana



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Mariana Niederheitmann
Visiting Scholar - Dept. of Horticulture and Crop Science - OARDC/The Ohio State University
PhD Candidate - Plant Breeding and Genetics - University of São Paulo (ESALQ-USP)
MSc - Plant Breeding and Genetics - Federal University of Lavras (UFLA)
Agronomist - Federal University of Paraná (UFPR)
+55 (19) 99848-7098
Skype: mariana.nieder
Reply | Threaded
Open this post in threaded view
|

Re: Display Labels in Results Table - Color Pixel Plugin

Herbie
Good day Mariana,

if you don't mind running a one-liner macro every time you've used the
Color Pixel Counter Plugin ...

Here it is:
setResult("Label",nResults-1,getTitle()+"_"+getResultLabel(nResults-1));

Paste the above macro code line to an empty macro window (Plugins >> New
 >> Macro).

Regards

Herbie

:::::::::::::::::::::::::::::::::::::
Am 12.12.18 um 17:53 schrieb mariana:

> Hi all,
>
> I have the task below to run using the Color Pixel Counter Plugin (after
> opening my image):
>
> run("RGB Color");
> run("Color Pixel Counter", "color=Red cells=20 pixels=0.2100 minimum=255
> display_0 display_1");
> run("Color Pixel Counter", "color=Green cells=20 pixels=0.2100 minimum=255
> display_0 display_1");
> run("Color Pixel Counter", "color=Blue cells=20 pixels=0.2100 minimum=255
> display_0 display_1");
>
> However, I have been struggling in displaying the name of my original file
> in the first column of the Results Table (what I guess would be the place
> for my "labels"):
>    Color Color Pixels Total Pixels Particles % Color
> 1 Red 1173093 1228800 5586157 95
> 2 Green 48230 1228800 229667 4
> 3 Blue 7477 1228800 35605 1
>
> Instead of the output displaying 1, 2 and 3, I would like it to display the
> name of my file. Could I apply the method for batch processing?
>
> Any assistance would be very welcome.
>
> Kind regards,
> Mariana
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Display Labels in Results Table - Color Pixel Plugin

mariana
Great, Herbie! Thank you so much! You helped me a lot!

For Batch Processing, I just used the following macro in Process >> Batch >>
Macro (since I am analyzing three colors in my pictures):

run("RGB Color");
run("Color Pixel Counter", "color=Red cells=20 pixels=0.2100 minimum=255
display_0 display_1");
run("Color Pixel Counter", "color=Green cells=20 pixels=0.2100 minimum=255
display_0 display_1");
run("Color Pixel Counter", "color=Blue cells=20 pixels=0.2100 minimum=255
display_0 display_1");
setResult("Label",nResults-1,getTitle()+"_"+getResultLabel(nResults-1));
setResult("Label",nResults-2,getTitle()+"_"+getResultLabel(nResults-2));
setResult("Label",nResults-3,getTitle()+"_"+getResultLabel(nResults-3));

Kind regards,
Mariana



-----
Mariana Niederheitmann
Visiting Scholar - Dept. of Horticulture and Crop Science - OARDC/The Ohio State University
PhD Candidate - Plant Breeding and Genetics - University of São Paulo (ESALQ-USP)
MSc - Plant Breeding and Genetics - Federal University of Lavras (UFLA)
Agronomist - Federal University of Paraná (UFPR)
+55 (19) 99848-7098
Skype: mariana.nieder
--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Mariana Niederheitmann
Visiting Scholar - Dept. of Horticulture and Crop Science - OARDC/The Ohio State University
PhD Candidate - Plant Breeding and Genetics - University of São Paulo (ESALQ-USP)
MSc - Plant Breeding and Genetics - Federal University of Lavras (UFLA)
Agronomist - Federal University of Paraná (UFPR)
+55 (19) 99848-7098
Skype: mariana.nieder