Creating Concentric Bands from ROI
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2019 年 10 月 9 日
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 件のコメント
Walter Roberson
2019 年 10 月 15 日
"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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!