Off Topic | Data Visualization, Statistics

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

Off Topic | Data Visualization, Statistics

Rainer M. Engel
Hello everyone.

I recently learned about SOFA, not the furniture, but a nice statistics
tool. http://sofastatistics.com/home.php

In addition to read data from various database formats it is possible to
work with xls or csv-files as well.
So I thought this might be useful for scientific work here and there. To
me it look very neat.

Has anyone experience with it or can make further suggestions of this kind?

Regards,
Rainer

--
Rainer M. Engel, Dipl. Digital Artist
scientific|Media GbR
Pichelsdorfer Str. 143
13595 Berlin

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

Re: Off Topic | Data Visualization, Statistics

José María Mateos
On 30/01/2013 12:57, Rainer M. Engel wrote:
>
> Has anyone experience with it or can make further suggestions of this kind?

Definitely, I would recommend R: http://www.r-project.org/

There are several courses in coursera.org right now that serve as nice
introductions to this programming language.

Best,

José.

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

Re: Off Topic | Data Visualization, Statistics

Rainer M. Engel
I made some tests with SVG, as a XML based format. The nice aspect about
it is the compatibility of opening these files rastered in ImageJ and
preview them as supposed (vector based) in any modern browser..

https://dl.dropbox.com/u/414433/imagej/graph.svg (try to zoom in)

Maybe a macro/plugin for this purpose which enables to create svg-graphs
from a results table would be nice. Mmmh.. depending on the flexibility
this can be quite complex. The provided graph was created via macro
which is rather simple so far.

Anyway, I think it is a pretty cool format, since one could enhance
these svg in inkscape, which is a free software as well. ... see
https://dl.dropbox.com/u/414433/imagej/graph_enhanced.svg

Has someone done similar things, what Do you think?

Best Regards,
Rainer

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

Re: Off Topic | Data Visualization, Statistics

Jan Eglinger
Dear Rainer, dear all,

On 28.02.2013 4:11 PM, Rainer M. Engel wrote:
> I made some tests with SVG, as a XML based format.
> [...]
> Anyway, I think it is a pretty cool format, since one could enhance
> these svg in inkscape, which is a free software as well. ... see
> https://dl.dropbox.com/u/414433/imagej/graph_enhanced.svg
>
> Has someone done similar things, what Do you think?

JFreeChart [*1*] is a java chart library that can write SVG files. It's
included in Fiji [*2*], so it can be used right within ImageJ. Several
Fiji plugins [*3*] make use of it, so you can learn by example by
examining their source.

I played with JFreeChart a while ago and created a small JavaScript to
display a graph as ImagePlus or save it as an SVG file. I pasted the
code below this mail. To try it out, just paste it in Fiji's script
editor, select 'Language>Javascript' and click 'Run'.

Cheers,
Jan


[*1*]: http://www.jfree.org/jfreechart/
[*2*]: http://fiji.sc/
[*3*]: see for example:
http://fiji.sc/Directionality
http://fiji.sc/TrackMate
http://fiji.sc/Simple_Neurite_Tracer

/* ****************************** */
/* Javascript to test JFreeChart functionality */

importPackage(Packages.org.jfree.chart);
importPackage(Packages.org.jfree.chart.plot);
importPackage(Packages.org.jfree.chart.axis);
importPackage(Packages.org.jfree.chart.encoders);
importPackage(Packages.org.jfree.chart.renderer.category);

importPackage(Packages.java.awt);
importPackage(Packages.java.awt.geom);
importPackage(Packages.java.io);

importPackage(Packages.org.jfree.ui);
importPackage(Packages.org.jfree.data.category);
importPackage(Packages.org.jfree.data.statistics);

importPackage(Packages.org.apache.batik.dom);
importPackage(Packages.org.apache.batik.svggen);

var dataset = new DefaultStatisticalCategoryDataset();

// dataset.add(Mean, StdDev, "Series", "Condition")
dataset.add(15.0, 2.4, "Row 1", "Column 1");
dataset.add(15.0, 4.4, "Row 1", "Column 2");
dataset.add(13.0, 2.1, "Row 1", "Column 3");
dataset.add(7.0, 1.3, "Row 1", "Column 4");
dataset.add(2.0, 2.4, "Row 2", "Column 1");
dataset.add(18.0, 4.4, "Row 2", "Column 2");
dataset.add(28.0, 2.1, "Row 2", "Column 3");
dataset.add(17.0, 1.3, "Row 2", "Column 4");

var chart = ChartFactory.createLineChart(
        null, // chart title
        "Compounds", // domain axis label
        "Relative change compared to control", // range axis label
        dataset, // data
        PlotOrientation.VERTICAL, // orientation
        false, // include legend
        true, // tooltips
        false // urls
);

// set the background color for the chart...
chart.setBackgroundPaint(Color.white);

var plot = chart.getPlot();
plot.setBackgroundPaint(Color.white);
plot.setRangeGridlinesVisible(false);
plot.setAxisOffset(RectangleInsets.ZERO_INSETS);

// customise the range axis...
var rangeAxis = plot.getRangeAxis();
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
rangeAxis.setAutoRangeIncludesZero(true);
rangeAxis.setRange(0, 40);

// customise the renderer...
var renderer = new StatisticalBarRenderer();
renderer.setErrorIndicatorPaint(Color.black);
renderer.setSeriesOutlinePaint(0,Color.black);
renderer.setSeriesOutlinePaint(1,Color.black);
renderer.setSeriesPaint(0,Color.black);
renderer.setSeriesPaint(1,Color.white);
renderer.setItemMargin(0.0);
plot.setRenderer(0,renderer);

renderer.setDrawBarOutline(true);

bi = chart.createBufferedImage(600, 400);

imp = new ImagePlus("Chart Test", bi);
imp.show();

// Create SVG image
// Get a DOMImplementation and create an XML document
var domImpl = GenericDOMImplementation.getDOMImplementation();
var document = domImpl.createDocument(null, "svg", null);

// Create an instance of the SVG Generator
var svgGenerator = new SVGGraphics2D(document);

// draw the chart in the SVG generator
var bounds = new Rectangle(600, 400);
chart.draw(svgGenerator, bounds);

var dir = IJ.getDirectory("Where should the svg file be saved?");
// Write svg file
var svgFile = new File(dir + "test.svg");
var outputStream = new FileOutputStream(svgFile);
var out = new OutputStreamWriter(outputStream, "UTF-8");
svgGenerator.stream(out, true /* use css */);
outputStream.flush();
outputStream.close();

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

Re: Off Topic | Data Visualization, Statistics

dscho
Hi Jan,

On Thu, 28 Feb 2013, Jan Eglinger wrote:

> /* ****************************** */
> /* Javascript to test JFreeChart functionality */
> [...]

Could you add this to http://fiji.sc/Scripting_toolbox? I think that it
would make for a very fine code example there.

Ciao,
Dscho

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

Re: Off Topic | Data Visualization, Statistics

Jan Eglinger
Hi Dscho,

On 28.02.2013 8:56 PM, Johannes Schindelin wrote:
> On Thu, 28 Feb 2013, Jan Eglinger wrote:
>
>> /* ****************************** */
>> /* Javascript to test JFreeChart functionality */
>> [...]
>
> Could you add this to http://fiji.sc/Scripting_toolbox? I think that it
> would make for a very fine code example there.

Good idea! Thanks for reminding me : )
I just did so, please feel free to improve the code.

Best,
Jan

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

Re: Off Topic | Data Visualization, Statistics

Rainer M. Engel
Thank you Jan,

that looks very nice, I'll try it..

Best Regards,
Rainer



Am 28.02.2013 21:11, schrieb Jan Eglinger:

> Hi Dscho,
>
> On 28.02.2013 8:56 PM, Johannes Schindelin wrote:
>> On Thu, 28 Feb 2013, Jan Eglinger wrote:
>>
>>> /* ****************************** */
>>> /* Javascript to test JFreeChart functionality */
>>> [...]
>>
>> Could you add this to http://fiji.sc/Scripting_toolbox? I think that it
>> would make for a very fine code example there.
>
> Good idea! Thanks for reminding me : )
> I just did so, please feel free to improve the code.
>
> Best,
> Jan

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

fiji.sc website error? for webpage manager

Cammer, Michael
I sent someone in the lab to look at Fiji but she had a problem because the webpage refused to load.

Using Firefox the page does not load at all; the browser window remains blank.
Explorer reports an error in the status bar but then recovers and loads ok.
Chrome works fine.
Did not try Safari on a Mac; this was on a Windows 7 PC.

Regards,
Michael


________________________________________________________
Michael Cammer, Assistant Research Scientist
Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208  Cell: (914) 309-3270

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

Re: fiji.sc website error? for webpage manager

ctrueden
Hi Michael,

> Using Firefox the page does not load at all; the browser window
> remains blank.

I cannot duplicate on my Windows 7 system with the latest release version
of Firefox (19.0).

> Explorer reports an error in the status bar but then
> recovers and loads ok.

It also works in Internet Explorer (9.0.8112.16421) for me with no errors.

So hopefully it was just a temporary issue with the server.

In the future, if fiji.sc ever refuses to load again, you can try the U.S.
mirror:

    http://fiji.lbl.gov/

Regards,
Curtis


On Tue, Mar 5, 2013 at 9:05 AM, Cammer, Michael
<[hidden email]>wrote:

> I sent someone in the lab to look at Fiji but she had a problem because
> the webpage refused to load.
>
> Using Firefox the page does not load at all; the browser window remains
> blank.
> Explorer reports an error in the status bar but then recovers and loads ok.
> Chrome works fine.
> Did not try Safari on a Mac; this was on a Windows 7 PC.
>
> Regards,
> Michael
>
>
> ________________________________________________________
> Michael Cammer, Assistant Research Scientist
> Skirball Institute of Biomolecular Medicine
> Lab: (212) 263-3208  Cell: (914) 309-3270
>
> --
> 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
|

v1.47k regression ?

Leon Espinosa-3
In reply to this post by Cammer, Michael
Dear ImageJ developers, I have found a strange behavior with roi.getName() method in v1.47k :

If a add some rois to roi manager manually (any type) I can get the roi names with simple script :

rm=new RoiManager().getInstance();
array=rm.getRoisAsArray();
for(i=0;i<rm.getCount(); i++) {
IJ.log(array[i].getName());
}

But if I use the /Analyse particles/"add to manager" option to generate the rois in the roi manager, it returns "null" for all the roi names. I have tested it programatically with an instance of ParticleAnalyzer class:
pa = new ParticleAnalyzer(ParticleAnalyzer.ADD_TO_MANAGER...    etc.  with the same results...

Maybe it could be related with the 1.47j version that corrects a "bug that could cause the ROI Manager to not work correctly if ROIs with duplicate names were programatically added"

Thank you for all this work... !

Leon

Plateforme de Biophotonique Appliquée à la Microbiologie
LCB CNRS UMR7283
31, Chemin Joseph AIGUIER
13009 MARSEILLE
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: fiji.sc website error? for webpage manager

dscho
In reply to this post by ctrueden
Hi Curtis,

On Tue, 5 Mar 2013, Curtis Rueden wrote:

> In the future, if fiji.sc ever refuses to load again, you can try the U.S.
> mirror:
>
>     http://fiji.lbl.gov/

Actually, this is the fall-back mirror should the better US mirror be
down:

        http://fiji.imagej.net/

Thanks!
Dscho

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

Re: fiji.sc website error? for webpage manager

ctrueden
Hi Dscho,

> http://fiji.imagej.net/

Considering that you & I set up that mirror, I am both amused and disturbed
that I forgot about its existence. I blame jet lag from my recent travels.
:-)

Yes, the fiji.imagej.net mirror is the ideal one to try first.

Regards,
Curtis


On Tue, Mar 5, 2013 at 10:52 AM, Johannes Schindelin <
[hidden email]> wrote:

> Hi Curtis,
>
> On Tue, 5 Mar 2013, Curtis Rueden wrote:
>
> > In the future, if fiji.sc ever refuses to load again, you can try the
> U.S.
> > mirror:
> >
> >     http://fiji.lbl.gov/
>
> Actually, this is the fall-back mirror should the better US mirror be
> down:
>
>         http://fiji.imagej.net/
>
> Thanks!
> Dscho
>

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

Re: v1.47k regression ?

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Leon Espinosa-3
On Mar 5, 2013, at 10:46 AM, Leon Espinosa wrote:

> Dear ImageJ developers, I have found a strange behavior with roi.getName() method in v1.47k :
>
> If a add some rois to roi manager manually (any type) I can get the roi names with simple script :
>
> rm=new RoiManager().getInstance();
> array=rm.getRoisAsArray();
> for(i=0;i<rm.getCount(); i++) {
> IJ.log(array[i].getName());
> }
>
> But if I use the /Analyse particles/"add to manager" option to generate the rois in the roi manager, it returns "null" for all the roi names. I have tested it programatically with an instance of ParticleAnalyzer class:
> pa = new ParticleAnalyzer(ParticleAnalyzer.ADD_TO_MANAGER...    etc.  with the same results...
>
> Maybe it could be related with the 1.47j version that corrects a "bug that could cause the ROI Manager to not work correctly if ROIs with duplicate names were programatically added"
>
> Thank you for all this work... !

This regression is fixed in the ImageJ 1.47m daily build.

-wayne

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