correction: ParticleAnalyzer instance insode/outside loop

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

correction: ParticleAnalyzer instance insode/outside loop

gankaku
sorry, obviously I am not setting the ParticleAnalyzer null inside the loop
in code snippet 1, I only do this in code snippet 2 !!!!!
since I create a new one every time. But the behaviour I stated in the
former post (
https://list.nih.gov/cgi-bin/wa.exe?A2=ind1407&L=IMAGEJ&D=1&O=D&P=72714)
happens under these circumstances.


Code snippet 1
...........some code ..............
ParticleAnalyzer analyzeSpeckles = new
ParticleAnalyzer(analyzerOptions, measurementFlags, rt, minSpeckleSize,
maxSpeckleSize);

for(int o=0; o<objectNumber; o++) {
imp2.setRoi(roi[o], true);
analyzeSpeckles.analyze(imp2, ip2);
specklesPerObject[o] = rt.getCounter();
rt.reset();

}
...........more code ..............


Code snippet 2

...........some code ..............
for(int o=0; o<objectNumber; o++) {
ParticleAnalyzer analyzeSpeckles = new
ParticleAnalyzer(analyzerOptions, measurementFlags, rt, minSpeckleSize,
maxSpeckleSize);

imp2.setRoi(roi[o], true);
analyzeSpeckles.analyze(imp2, ip2);
specklesPerObject[o] = rt.getCounter();
rt.reset();
analyzeSpeckles = null;
}

sorry for the confusion.
cheers,
Jan

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