How to remove ROI that touch the image border?

Home Forums Protocols How to remove ROI that touch the image border?

  • Marine

    Hello,

    Is there a way to remove ROI already detected (using HK-means and active contours) that touch image border?

    Thank you for your help!

    Marine

    Stephane Dallongeville

    Hi Marine,

    I just set up a small protocol to do it called “Remove ROIS touching image border”.
    You can download it directly from the application typing “Remove ROIS” into the search bar, it should appears in the “Procotol” section of result (at bottom).

    Best,

    – Stephane

    Marine

    Thanks a lot Stéphane!

    It works perfectly.

    Best,

    Marine

    deborakeller0@gmail.com

    HI Stephane,

    does this work for all timepoints?

    I have the following script (I guess from you before  you made it as a protocol) – it works, but only at the first time point.

    Any way to make it work at all timepoints ? cheers

    Debbi

    // Click on the button
    // to edit in a frame.

    bounds = input0.getBounds2D()
    output0 = []
    ind = 0;

    for(i = 0; i < input1.length; i++)
    {
    r = input1[i]

    rbounds = r.getBounds5D().toRectangle2D();
    if ((rbounds.getMinX() == bounds.getMinX()) ||
    (rbounds.getMinY() == bounds.getMinY()) ||
    (rbounds.getMaxX() == bounds.getMaxX()) ||
    (rbounds.getMaxY() == bounds.getMaxY()))
    continue;

    output0[ind++] = r;
    }

    Stephane Dallongeville

    The script you’re using doesn’t look really safe for that, why just don’t use the protocol posted above ? it does contains a small part of script doing the job 🙂

    – Stephane

     

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Protocols’ is closed to new topics and replies.