Efficient ROI merging

38 views
Skip to first unread message

Jeremy Pike

unread,
Dec 20, 2016, 6:48:55 AM12/20/16
to Icy imaging

Hi all

I've had problems with the merge ROI block being very slow with more than approx 500 3D ROIs. Ive tried scripting with either ROIUtil.merge() or the ROI.add() function but this is still slow. My current workaround is to loop over all the ROIs and create a binary sequence which I then convert to a ROI using the threshold block as in the attached protocol. This is fast but not exactly neat. 

Is there a nice and fast way to merge lots of 3D ROIs?

Thank you

Best
Jeremy


mergeROIs.protocol
mergeROIs.protocol_screenshot.png

Stephane

unread,
Dec 21, 2016, 8:07:40 AM12/21/16
to Icy imaging
Hi Jeremy,

Do you have an example of an image with the 500 3D rois (xml data) you want to merge ? In fact merging was really slow back in time but now it should perform faster. Having an example can help us in understanding and resolving the performance issue.
Thanks :)

Best,

- Stephane

Jeremy Pike

unread,
Jan 6, 2017, 6:40:02 AM1/6/17
to Icy imaging
Hi

Sorry for the slow reply. I've attached an xml data file with about 2000 ROIs (some 2D and some 3D). Is this sufficient as I think the raw data file is probably too big to upload here? To generate these ROIs I used the spot detector plugin. On my PC these ROIs take about 3 minutes to merge. The workaround posted above takes about a second.

Thank you
Best
Jeremy
exampleImageStackWithROIs.xml

Stephane

unread,
Jan 6, 2017, 11:47:35 AM1/6/17
to Icy imaging
Hi Jeremy,

Thanks for the sample, i was able to reproduce it !
The mix of 3D and 2D ROI make the merge processing very slow. We will work to improve the performance as it's not usable in the current state indeed as soon you have more than few hundred ROIs. Your method is a working workaround but it would be better to improve the current implementation, thanks for pointing it !

Best,

- Stephane
Reply all
Reply to author
Forward
0 new messages