remove roi from a script into a protocol

23 views
Skip to first unread message

MLB

unread,
Jun 17, 2015, 12:47:30 PM6/17/15
to icy-so...@googlegroups.com
Hi,

I would like to remove ROI into a script launched by a protocol.

First rois have a standard prefix name. I create others Rois from, and I would like to erase first ROI at the end of the script.

Attached is a reduce code of my wishe.  (sample is the script of interest)

In a script it runs well, but not a script launched by  a protocol.
Any ideas ?
Thank you for your help

Marie Laure

removeROI from script Protocol.protocol

Stephane

unread,
Jul 17, 2015, 4:51:51 AM7/17/15
to icy-so...@googlegroups.com, marielau...@gmail.com
Hi MLB,

In your script you are just  doing :

lesROIs= sequence.getROIs(true)
roi
=lesROIs.get(1);

nameROI
=roi.getName()
println
("---nameROI----"+nameROI)

roi
.remove()

So you will always remove the ROI at position 1, but maybe you want to remove a ROI with a specific name ?
Also you may use :

sequence.removeROI(roi)
instead of
roi.remove()

they should do the same action but it better to use the first method (which is actually faster)

- Stephane
Reply all
Reply to author
Forward
0 new messages