Login  Register

Re: Analyze particles without GUI

Posted by federica viti on Apr 18, 2008; 4:23pm
URL: http://imagej.273.s1.nabble.com/Analyze-particles-without-GUI-tp3696537p3696541.html

Thank you very much Thomas!
I used the command that you suggested and now the macro doesn't save the
file as I would like but it prints the correct output on the shell, so in
some way I think I can manage to save the results in a file (maybe using
redirection).
Thank for your precious help!
Federica


On Fri, Apr 18, 2008 at 2:40 PM, Thomas Boudier <
[hidden email]> wrote:

> Hi,
>
> Maybe you need to add space in our analyse particle command like :
>
> run("Analyze Particles...",
> > "Size="+dimensione+" Cicularity="+curvatura+" Show="+forma+" Include
> Holes");
>
> It is best to make a template from plugins/record, it's looks like this
> with my version (1.40d) :
> run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00
> show=Ellipses display exclude include add slice");
>
> Thomas
>
> federica viti a écrit :
>
>  On Fri, Apr 18, 2008 at 12:07 PM, Gabriel Landini <[hidden email]>
> > wrote:
> >
> >  On Friday 18 April 2008 09:52:27 federica viti wrote:
> > >
> > > > Hi!
> > > > I'm new to ImageJ and I'm working in batch mode, using macros,
> > > > without
> > > >
> > > GUI.
> > >
> > > > I run Analyze Particles on an active image, but then I'm not able to
> > > >
> > > save
> > >
> > > > the produced output (the elaborated image and, particularly, the txt
> > > > results file reporting the measurements): if I run the 'save'
> > > > command it
> > > > saves the input image, not the output one.
> > > > I looked around in Internet but I couldn't find the solution.
> > > > Can anyone help me, please?
> > > > Thank you very much,
> > > > Federica
> > > >
> > >
> > > I guess that you are not issuing "selectImage" and "selectWindow"
> > > commands
> > > before applying the "save".
> > >
> > > Cheers,
> > >
> > > G.
> > >
> > >
> >
> > Hi!
> > here's a part of my code.
> > "Results" is the name (string) of the xtx window in output from the
> > Analyze
> > Particles macro.
> >
> > path = "/mydir/try.txt";
> > dimensione="300-Infinity";
> > curvatura="0.00-1.00";
> > forma="Ellipses";
> > run("Analyze Particles...",
> > "Size="+dimensione+"Cicularity="+curvatura+"Show="+forma+"Include
> > Holes");
> > //I also tried with adding +"Display Results"+ option, but still doesn't
> > work
> > selectWindow("Results");
> > save(path);
> >
> > and if I execute the shell command:
> > ./jre/bin/java -jar ij.jar -batch macros/FedeTries_BatchMode.txt
> > the output is:
> > No window with the title "Results" found.
> > This command requires a TextWindow such as
> > the "Log" window or an "Info for..." window.
> >
> > I can't undestrastand what's wrong..
> >
> > Cheers,
> > Federica
> >
> >
> >
> --
> /*****************************************************/
>    Thomas Boudier, MCU Université Paris 6,
>    UMR 7101 / IFR 83. Bat A 328, Jussieu.
>    Tel : 01 44 27 35 78  Fax : 01 44 27 25 08
> /****************************************************/
>