Short Description
Set of block (for graphical programming with Protocols) to perform different operations on ROI (Region Of Interest).
Documentation
Bundle of blocks (Protocols) to perform different operations on ROI (Region Of Interest).
Supported operations:
- Create rectangular ROI (2D, 3D, 4D or 5D)
- Filter / sort / color from ROI descriptor
- Perform boolean / logical operation between two set of ROI
- Separate ROIs (into connected components) -> “Separate ROI Components”
- Split ROIs (using Watersheds) -> “Separate ROI Watershed”
- Get / set ROI position (either box top-left position or box center)
- Get / set ROI size
- Get / set ROI properties (name, color, opacity…)
- Load ROI(s) from file
- Save ROI(s) to file
The Filter ROI block
The Filter ROI block support filtering on any descriptor. It’s why the Value field accepts text so you can specify any text (regexp are accepted) if you want to filter on a text type descriptor as Name (in which case only EQUAL or NOT_EQUAL comparison operator make sense). For number type descriptors (a large majority of them) you can of course input any number as text in Value field and the number will be correctly interpreted.
When filtering ROIs by Color, use the following format when expressing the color in hexadecimal values:
AARRGGBB
where AA is the alpha value, RR is the red value, GG, is the green value, and BB is the blue value.
To find the hexadecimal color code of a given ROI, select this ROI in the list, click on its color in Properties and go to the rightmost tab called “Xoetrope color wheel”. The hexadecimal code is FF + the code you see above the Hue, Saturation and Brightness values.
For instance, the hexadecimal code of this orange rectangle2D is FFFF9933. The protocol shown in the two screenshots removes ROIs of a given color.
Note that you can indicate the code in upper of lower case. Don’t put any space and don’t forget to specify the alpha (always equal to “FF”).
ROI position
position X, Y, Z, T, C: the position of the upper left corner of the bounding box around the ROI along each axis (x, y, z, frame and channel)
position X(center), Y(center), Z(center) or Set XYZ Center: coordinates (in pixels) of the center of mass of the ROI
position Z, T and C equal to -1 by default, which means the ROI appear on all Z slices, all frames and all channels.
Example on Get/Set ROI position
Let’s take a ROI example:
Position X = 100
Position Y = 190
Size X = 150
Size Y = 90
Position X (center) = 175
Position Y (center) = 235
Let’s get the ROI position of the upper left corner and center of mass with the block Get ROI position:
Now let’s move the ROI center of mass to the upper right corner of the image. To do so, we use the Set ROI position block, tick the Set XYZ Center box and indicate the new coordinates of the center of mass in position X and position Y.
2 reviews on “ROI blocks”