Create label matrix from set of ROIs
creates a numeric label matrix L
= poly2label(ROIpositions
,ROILabelIDs
,imagesize
)L
from the regions of interest (ROIs)
defined in ROIpositions
. ROILabelIDs
specifies the
numeric ID for each ROI in ROIpositions
. imagesize
specifies the size of the output label matrix.
creates a numeric label matrix where the spatial referencing object L
= poly2label(ROIpositions
,ROILabelIDs
,R
)R
specifies the coordinate system used by the ROI positions in
ROIpositions
. The function assumes that the ROI positions are in
world limits defined by R
. The ImageSize
property of
R
specifies the size of the label matrix
L
.
The poly2label
function sets pixels that are inside an ROI to a
label value. For information about how poly2label
handles pixels that
are only partially inside an ROI, see the poly2mask
function.
When the positions of several ROIs overlap each other, the ROI label with the lowest
index number in the ROIpositions
cell array overwrites the other
ROIs.