CONTENTS DELETED
The author has deleted this message.
|
Thank you Tom,
Can you help me in setting the parameters? Here is what I tried, ParticleAnalyzer pa = new ParticleAnalyzer(); pa.analyze(imp); drawIm = pa.getOutputImage(); drawIm.show(); But still getting Null Pointer Exception, I couldn't find any function to set the parameters as I used to do in the run command: IJ.run(imp, "Analyze Particles...", "size=250-Infinity pixel circularity=0.00-1.00 show=Outlines add"); Best Regards, Mohamed Tleis On Wed, Jan 18, 2012 at 3:55 PM, Tom Runia <[hidden email]> wrote: > I think you are better off using the ParticleAnalyzer class: > > http://rsbweb.nih.gov/ij/developer/api/ij/plugin/filter/ParticleAnalyzer.html > > First you set all the parameters and use the analyze() method to analyze > your image. Afterwards you can use the getOutputImage() method to get an > ImagePlus object of the image containing the outlines. Then you can simple > save this image. Hopefully it helps! > > Best, > > Tom > > > 2012/1/18 Mohammed Tlais <[hidden email]> > > > Dear Folks, > > > > I want to save the outlines of my particles, but not succeeding in that. > > > > The following code is supposed to show the Outlines of my particles > > > > IJ.run(finIm, "Analyze Particles...", "size=250-Infinity pixel > > circularity=0.00-1.00 show=Outlines add"); > > > > Now how can I save it? > > I was trying the following (since the outlines are automatically named > > Drawing Of Title ) > > > > ImagePlus imp = new ImagePlus(); > > imp = WindowManager.getImage("Drawing Of " + title ); > > IJ.save(imp, imDir\\Drawing Of "+ title +".tif" ); > > > > But this is saving the original images!! > > trying to do imp.show(); gives a null pointer exception error !! > > > > Can you provide me with help or suggestions please? > > > > Best Regards, > > Mohamed Tleis > > > |
Hello,
You need to use the ParticleAnalyzer(int options, int measurements, ResultsTable rt, double minSize, double maxSize) constructor int options = ParticleAnalyzer.OUTLINES; int measurements = ParticleAnalyzer.MEAN + ParticleAnalyzer.AREA; // Maybe you can put "0" or Analyzer.getMeasurements() to get the current measurement options; ResultsTable rt = new ResultsTable(); ParticleAnalyzer pa = new ParticleAnalyzer(options, measurements, rt, 250, Double.MAX_VALUE ); And then followed by your code. Let me know if this helps. Best Oli Olivier Burri Engineer, Development in Image Processing BioImaging and Optics platform (PTBIOP) Tel: [+4121 69] 39629 ________________________________________ From: ImageJ Interest Group [[hidden email]] on behalf of Mohammed Tlais [[hidden email]] Sent: Thursday, January 19, 2012 10:12 AM To: [hidden email] Subject: Thank you Tom, Can you help me in setting the parameters? Here is what I tried, ParticleAnalyzer pa = new ParticleAnalyzer(); pa.analyze(imp); drawIm = pa.getOutputImage(); drawIm.show(); But still getting Null Pointer Exception, I couldn't find any function to set the parameters as I used to do in the run command: IJ.run(imp, "Analyze Particles...", "size=250-Infinity pixel circularity=0.00-1.00 show=Outlines add"); Best Regards, Mohamed Tleis On Wed, Jan 18, 2012 at 3:55 PM, Tom Runia <[hidden email]> wrote: > I think you are better off using the ParticleAnalyzer class: > > http://rsbweb.nih.gov/ij/developer/api/ij/plugin/filter/ParticleAnalyzer.html > > First you set all the parameters and use the analyze() method to analyze > your image. Afterwards you can use the getOutputImage() method to get an > ImagePlus object of the image containing the outlines. Then you can simple > save this image. Hopefully it helps! > > Best, > > Tom > > > 2012/1/18 Mohammed Tlais <[hidden email]> > > > Dear Folks, > > > > I want to save the outlines of my particles, but not succeeding in that. > > > > The following code is supposed to show the Outlines of my particles > > > > IJ.run(finIm, "Analyze Particles...", "size=250-Infinity pixel > > circularity=0.00-1.00 show=Outlines add"); > > > > Now how can I save it? > > I was trying the following (since the outlines are automatically named > > Drawing Of Title ) > > > > ImagePlus imp = new ImagePlus(); > > imp = WindowManager.getImage("Drawing Of " + title ); > > IJ.save(imp, imDir\\Drawing Of "+ title +".tif" ); > > > > But this is saving the original images!! > > trying to do imp.show(); gives a null pointer exception error !! > > > > Can you provide me with help or suggestions please? > > > > Best Regards, > > Mohamed Tleis > > > |
Free forum by Nabble | Edit this page |