ImageStatistics

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

ImageStatistics

Lenka Polaskova
Hello,
I am writting a new plugin in java and I need to get and use image statistics displayed in measurements result table. For now I use a method getStatistics() that allows me to measure Area, Mean, Mode, Min, Max, StdDev, RX, RY statistics and save them into my variables. But the measurements result table offers to read other statistics such as IntDen, RawDen, XM, YM and else. Also a command Color Histogram displays a measurements result table, where statistics such as red mean, red mode, green mean and else are. Please can someone tell me how could I get these orther statistics and save them in variables or text window?
I would be very grateful for advice
Lenka

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

Re: ImageStatistics

parfait evouna
Hi,Have you try:
getResult("Column", row)?

> Date: Fri, 6 Jul 2012 08:37:24 -0400
> From: [hidden email]
> Subject: ImageStatistics
> To: [hidden email]
>
> Hello,
> I am writting a new plugin in java and I need to get and use image statistics displayed in measurements result table. For now I use a method getStatistics() that allows me to measure Area, Mean, Mode, Min, Max, StdDev, RX, RY statistics and save them into my variables. But the measurements result table offers to read other statistics such as IntDen, RawDen, XM, YM and else. Also a command Color Histogram displays a measurements result table, where statistics such as red mean, red mode, green mean and else are. Please can someone tell me how could I get these orther statistics and save them in variables or text window?
> I would be very grateful for advice
> Lenka
>
> --
> 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: ImageStatistics

Michael Schmid
In reply to this post by Lenka Polaskova
Hi Lenka,

you can have a look at ij.plugin.filter.Analyzer, method 'saveResults' to see how the values not directly available from the ImageStatistics are calculated:

E.g. you will there find:
  rt.addValue(ResultsTable.INTEGRATED_DENSITY,stats.area*stats.mean);
So, the integrated density is stats.area*stats.mean, with 'stats' being the ImageStatistics.


Michael
________________________________________________________________


On Jul 6, 2012, at 14:37, Lenka Polaskova wrote:

> Hello,
> I am writting a new plugin in java and I need to get and use image statistics displayed in measurements result table. For now I use a method getStatistics() that allows me to measure Area, Mean, Mode, Min, Max, StdDev, RX, RY statistics and save them into my variables. But the measurements result table offers to read other statistics such as IntDen, RawDen, XM, YM and else. Also a command Color Histogram displays a measurements result table, where statistics such as red mean, red mode, green mean and else are. Please can someone tell me how could I get these orther statistics and save them in variables or text window?
> I would be very grateful for advice
> Lenka

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

Re: ImageStatistics

Lenka Polaskova
Hello
thank a lot for your quick response, now it works. But unfortunatelly,
there is another problem. I cannot achieve an image type convertion from
8-bit grayscale to RGB. I've tried to call ip.convertToRGB() method or
IJ.run("RGB Color") method but without any luck. Any ideas?

2012/7/6 Michael Schmid <[hidden email]>

> Hi Lenka,
>
> you can have a look at ij.plugin.filter.Analyzer, method 'saveResults' to
> see how the values not directly available from the ImageStatistics are
> calculated:
>
> E.g. you will there find:
>   rt.addValue(ResultsTable.INTEGRATED_DENSITY,stats.area*stats.mean);
> So, the integrated density is stats.area*stats.mean, with 'stats' being
> the ImageStatistics.
>
>
> Michael
> ________________________________________________________________
>
>
> On Jul 6, 2012, at 14:37, Lenka Polaskova wrote:
>
> > Hello,
> > I am writting a new plugin in java and I need to get and use image
> statistics displayed in measurements result table. For now I use a method
> getStatistics() that allows me to measure Area, Mean, Mode, Min, Max,
> StdDev, RX, RY statistics and save them into my variables. But the
> measurements result table offers to read other statistics such as IntDen,
> RawDen, XM, YM and else. Also a command Color Histogram displays a
> measurements result table, where statistics such as red mean, red mode,
> green mean and else are. Please can someone tell me how could I get these
> orther statistics and save them in variables or text window?
> > I would be very grateful for advice
> > Lenka
>
> --
> 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
|

Convert to RGB problem

Michael Schmid
Hi Lenka,

first a general remark: please start a new thread for a new problem, don't
simply reply to an unrelated topic.

Both of your versions to convert an image to RGB should work:
  ImageProcessor myNewRgbProcessor = ip.convertToRGB();
and, if the image is the current foreground image,
  IJ.run("RGB Color");
It would be better to specify also the ImagePlus (here named imp), in case
a simultaneous process changes the foreground image (remember that Java is
multi-threaded):
  IJ.run(imp, "RGB Color");
Thereafter, of course, you have to use imp.getProcessor() to get the
converted ImageProcessor.

Michael
________________________________________________________________________




On Sat, July 7, 2012 14:54, Lenka Polá¹ková wrote:

> Hello
> thank a lot for your quick response, now it works. But unfortunatelly,
> there is another problem. I cannot achieve an image type convertion from
> 8-bit grayscale to RGB. I've tried to call ip.convertToRGB() method or
> IJ.run("RGB Color") method but without any luck. Any ideas?
>
> 2012/7/6 Michael Schmid <[hidden email]>
>
>> Hi Lenka,
>>
>> you can have a look at ij.plugin.filter.Analyzer, method 'saveResults'
>> to
>> see how the values not directly available from the ImageStatistics are
>> calculated:
>>
>> E.g. you will there find:
>>   rt.addValue(ResultsTable.INTEGRATED_DENSITY,stats.area*stats.mean);
>> So, the integrated density is stats.area*stats.mean, with 'stats' being
>> the ImageStatistics.
>>
>>
>> Michael
>> ________________________________________________________________
>>
>>
>> On Jul 6, 2012, at 14:37, Lenka Polaskova wrote:
>>
>> > Hello,
>> > I am writting a new plugin in java and I need to get and use image
>> statistics displayed in measurements result table. For now I use a
>> method
>> getStatistics() that allows me to measure Area, Mean, Mode, Min, Max,
>> StdDev, RX, RY statistics and save them into my variables. But the
>> measurements result table offers to read other statistics such as
>> IntDen,
>> RawDen, XM, YM and else. Also a command Color Histogram displays a
>> measurements result table, where statistics such as red mean, red mode,
>> green mean and else are. Please can someone tell me how could I get
>> these
>> orther statistics and save them in variables or text window?
>> > I would be very grateful for advice
>> > Lenka
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html