Often I need to extract ROIs from a connected components image. What I do is
t2s = ThresholdToSelection() for i in labels: ip.setThreshold(i,i) roi = t2s.convert(ip) ...
This is much slower than running a ParticleAnalyzer(). However, I believe that ParticleAnalyzer needs a binarised image so if the connected components image has touching parts they get merged.
Is there a better way to extract ROIs?