Login  Register

Issue with ParticleAnalyzer output

Posted by Ludgate, David on Aug 02, 2005; 6:41pm
URL: http://imagej.273.s1.nabble.com/Issue-with-ParticleAnalyzer-output-tp3705096.html

Hi,
I'm using the ParticleAnalyzer class to find particles and I need to
record the irregular ROIs that define each particle. I did this simply
by overriding the drawParticle method to record each ROI as it drew
them. So now my program displays an image of all the filled particles
and records the ROIs, which I use elsewhere.
My problem is that I run though this procedure many times and if I leave
all those images open I run out of memory really quickly. So I've been
trying to look for a way to close the images that the ParticleAnalyzer
makes automatically. I'm working directly with classes so i'd rather not
have to go to ImageJ's window manager and try to find each image, and
instead get the ImagePlus object used directly from the ParticleAnalyzer
class.
Unfortunately, as far as I can see, this is the line that creates that
window:
new ImagePlus
<file:///E:/documents/apps/imagej/imagej%20source/html-source/ij/ImagePl
us.java.html> (prefix+title, outlines).show();
The ParticleAnalyzer thus has no way of keeping track of that window
once it is created.
Furthermore, I cannot override the method (at least, my IDE tells me I
can't) since "it is private to a different package".
 
Does anyone know of a way I can get around this? At the moment I do not
directly use the ImageJ program and deal with the classes directly,
thus, ImageJ doesn't recognise the windows I open as existing.
 
TIA, dave