overlay mask on sequence of mri images to mark out tumor ROI
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Raheema Al Karim Damani
il 18 Ott 2019
Commentato: Image Analyst
il 19 Ott 2019
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 Commenti
Risposta accettata
Daniel M
il 19 Ott 2019
Modificato: Daniel M
il 19 Ott 2019
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 Commento
Image Analyst
il 19 Ott 2019
Like this:
% Mask the image using bsxfun() function to multiply the mask by each channel individually.
maskedImage3d = bsxfun(@times, image3d, cast(mask, 'like', image3d));
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MRI in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!