[ImageJ-devel] help with Confidence Interval Autoscale method?
Mark Hiner
hiner at wisc.edu
Fri Jan 30 10:33:13 CST 2015
Hi Francis,
An AutoscaleMethod is a plugin to an AutoscaleService[1], and is either
accessed directly (via getAutoscaleMethod) or indirectly (via
getDefaultMethod or the getDefault...Range metods). To use this code in
ImageJ you would either have to use a command that calls into the
AutoscaleService, or write your own plugin/macro.
Here's an example of a simple python macro that prints the min/max
calculated using the confidence interval method:
------
# @AutoscaleService asService
# @net.imagej.Dataset data
m = asService.getAutoscaleMethod('Confidence Interval')
r = m.getRange(data)
print 'Range min: ', r.getMin(), ', max: ', r.getMax()
----
The first two lines are script parameters[2]. The AutoscaleService is
available by default, but for a Dataset you will have to open an image
either with ImageJ2/SCIFIO enabled (Edit > Options > ImageJ2) or using the
"File > Import > Image..." command directly.
Hope that helps. Let me know if you have any more questions.
Best,
Mark
[1]
https://github.com/imagej/imagej-common/blob/master/src/main/java/net/imagej/autoscale/AutoscaleService.java
[2] http://imagej.net/Script_parameters
On Mon, Jan 26, 2015 at 11:38 PM, Francis OBrien <
francisobrien2007 at gmail.com> wrote:
> Hello,
>
> I am a total newbie so I am willing to learn if people can point me in
> the right direction. I am trying to get the following code for confidence
> interval autoscaling to work but I keep getting the errors in Fiji when I
> try to run the code.
>
>
> https://github.com/imagej/imagej-common/blob/master/src/main/java/net/imagej/autoscale/ConfidenceIntervalAutoscaleMethod.java
>
> How do I use this code in ImageJ? Is it run as a macro?
>
> Best,
>
> Francis
>
> --
> Regards,
>
> Francis
>
> Research graduate,
> New York School of Medicine
> New York
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150130/7a78958b/attachment.html>
More information about the ImageJ-devel
mailing list