overlay mask on sequence of mri images to mark out tumor ROI
1 回表示 (過去 30 日間)
古いコメントを表示
Raheema Al Karim Damani
2019 年 10 月 18 日
コメント済み: Image Analyst
2019 年 10 月 19 日
I created a mask based on one frame to mark out my ROI region.
segment_mask = poly2mask(xi, yi, 256, 256);
Is there a way I can overlay this mask onto my sequence of frames stored in a 3d array(256 x 256 x #of frames)?
0 件のコメント
採用された回答
Daniel M
2019 年 10 月 19 日
編集済み: Daniel M
2019 年 10 月 19 日
maskedImg = imgArray.*segment_mask;
% segment_mask is size [256,256]
% maskedImg is same size as imgArray
[256, 256, #of frames]
If you are using an older version of Matlab you may have to use bsxfun().
1 件のコメント
Image Analyst
2019 年 10 月 19 日
Like this:
% Mask the image using bsxfun() function to multiply the mask by each channel individually.
maskedImage3d = bsxfun(@times, image3d, cast(mask, 'like', image3d));
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!