Analyze particles producing new image

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

Analyze particles producing new image

João Silva
Good morning everyone!



I'm developing a plugin and at a certain point i need to use the analyze particles command. I would like to know hou can I name the new image I'm forming. This code line creates the new image:



IJ.run(treatT4, "Analyze Particles...", "size=" + minS +"-inf" + " circularity="+ minC + "-" +maxC + " show=Masks in_situ");



Best regards,



João

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

Re: Analyze particles producing new image

Leon Espinosa-3
Hello Joao, I have solved this point in my plugins using the class ParticleAnalyzer :

(Jython syntax)

rt=ResultsTable()  # new results table
pa1=ParticleAnalyzer(ParticleAnalyzer.SHOW_MASKS+ParticleAnalyzer.EXCLUDE_EDGE_PARTICLES , Measurements.AREA, rt, self.__minArea, self.__maxArea, self.__minCirc, self.__maxCirc) # ParticleAnalyzer object
pa1.setHideOutputImage(True) # hides the mask produced by the ParticleAnalyzer object
pa1.analyze(imp) # makes the analyze
masks=pa1.getOutputImage() # this is the mask (an ImagePlus object) generated by the ParticleAnalyzer

I hope it helps...

Leon



Le 9 juil. 2013 à 14:50, João Silva a écrit :

> Good morning everyone!
>
>
>
> I'm developing a plugin and at a certain point i need to use the analyze particles command. I would like to know hou can I name the new image I'm forming. This code line creates the new image:
>
>
>
> IJ.run(treatT4, "Analyze Particles...", "size=" + minS +"-inf" + " circularity="+ minC + "-" +maxC + " show=Masks in_situ");
>
>
>
> Best regards,
>
>
>
> João
>
> --
> 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: Analyze particles producing new image

João Silva
Unfortunately I understand nothing about Jython, just Java.

Could you help me out in Java?

________________________________________
De: ImageJ Interest Group [[hidden email]] em nome de Leon Espinosa [[hidden email]]
Enviado: terça-feira, 9 de Julho de 2013 14:38
Para: [hidden email]
Assunto: Re: Analyze particles producing new image

Hello Joao, I have solved this point in my plugins using the class ParticleAnalyzer :

(Jython syntax)

rt=ResultsTable()  # new results table
pa1=ParticleAnalyzer(ParticleAnalyzer.SHOW_MASKS+ParticleAnalyzer.EXCLUDE_EDGE_PARTICLES , Measurements.AREA, rt, self.__minArea, self.__maxArea, self.__minCirc, self.__maxCirc) # ParticleAnalyzer object
pa1.setHideOutputImage(True) # hides the mask produced by the ParticleAnalyzer object
pa1.analyze(imp) # makes the analyze
masks=pa1.getOutputImage() # this is the mask (an ImagePlus object) generated by the ParticleAnalyzer

I hope it helps...

Leon



Le 9 juil. 2013 à 14:50, João Silva a écrit :

> Good morning everyone!
>
>
>
> I'm developing a plugin and at a certain point i need to use the analyze particles command. I would like to know hou can I name the new image I'm forming. This code line creates the new image:
>
>
>
> IJ.run(treatT4, "Analyze Particles...", "size=" + minS +"-inf" + " circularity="+ minC + "-" +maxC + " show=Masks in_situ");
>
>
>
> Best regards,
>
>
>
> João
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Analyze particles producing new image

dscho
Hi João,

please note:

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

To return the favor, I will answer above the quoted text and not make
clear what I am referencing. The Jython code is different from the
corresponding Java code in only three points:

1) Jython code does not need to be enclosed in a method, let alone a class
2) Jython statements do not end in a semicolon
3) Jython does not require the 'new' keyword in front of constructors

Ciao,
Johannes

On Tue, 9 Jul 2013, João Silva wrote:

> Unfortunately I understand nothing about Jython, just Java.
>
> Could you help me out in Java?
>
> ________________________________________
> De: ImageJ Interest Group [[hidden email]] em nome de Leon Espinosa [[hidden email]]
> Enviado: terça-feira, 9 de Julho de 2013 14:38
> Para: [hidden email]
> Assunto: Re: Analyze particles producing new image
>
> Hello Joao, I have solved this point in my plugins using the class ParticleAnalyzer :
>
> (Jython syntax)
>
> rt=ResultsTable()  # new results table
> pa1=ParticleAnalyzer(ParticleAnalyzer.SHOW_MASKS+ParticleAnalyzer.EXCLUDE_EDGE_PARTICLES , Measurements.AREA, rt, self.__minArea, self.__maxArea, self.__minCirc, self.__maxCirc) # ParticleAnalyzer object
> pa1.setHideOutputImage(True) # hides the mask produced by the ParticleAnalyzer object
> pa1.analyze(imp) # makes the analyze
> masks=pa1.getOutputImage() # this is the mask (an ImagePlus object) generated by the ParticleAnalyzer
>
> I hope it helps...
>
> Leon
>
>
>
> Le 9 juil. 2013 à 14:50, João Silva a écrit :
>
> > Good morning everyone!
> >
> >
> >
> > I'm developing a plugin and at a certain point i need to use the analyze particles command. I would like to know hou can I name the new image I'm forming. This code line creates the new image:
> >
> >
> >
> > IJ.run(treatT4, "Analyze Particles...", "size=" + minS +"-inf" + " circularity="+ minC + "-" +maxC + " show=Masks in_situ");
> >
> >
> >
> > Best regards,
> >
> >
> >
> > João
> >
> > --
> > 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
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html