Creating Concentric Bands from ROI
5 views (last 30 days)
Show older comments
Hi,
I'm currently trying to develop a code that can create concentric bands (preferably 2 or 3) based on the shape of the user-defined ROI. The ROI has to be hand-drawn since the object of interest varies in shape for different images. Is there any way to implement this without the use of premade ROI shapes (like instead of using concentric bands from drawellipse or drawrectangle).
An example of what I'm trying to do is shown in the image (where the black blob is the object of interest, the original ROI drawn by the user is the black outline, and each red band is a concentric band that is of equal distance from the ROI). Any help would be GREATLY appreciated.

0 Comments
Answers (1)
Walter Roberson
on 9 Oct 2019
Create an array that all true (or which is all true outside the ROI boundary including the boundary). Create another array that is true at the ROI boundary. Use bwdistgeodesic() . Now you can trace contours in the distance information returned.
Note: this will not work if you need strict euclidean distances to the boundaries.
2 Comments
Walter Roberson
on 15 Oct 2019
"Now you can trace contours in the distance information returned."
The return would be an array of distances. Distances <= band_distance and trace the outside to get the boundary for that distance, or use contour() to create a contour matrix. There are routines in the File Exchange that convert contour matrix into rois.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!