Masking data of 4D images
古いコメントを表示
Hi there,
I have a 3D binary mask and I would like to mask my 4D data. So basically I would like to keep the information of my 4D data in all the voxels corresponding to the mask.
Any idea how to do this?
回答 (1 件)
David Legland
2019 年 10 月 10 日
Hi Gina,
I suppose that you want to repeat the binary mask along the missing dimension of your 4D data, right?
One possibility could be the following:
mask4d = repmat(mask, 1, 1, 1, size(data, 4));
values = data(mask4d);
(This assumes that the three dimensions of the mask correspond to the first three dimension of the data).
1 件のコメント
Gina Carts
2019 年 10 月 10 日
編集済み: Gina Carts
2019 年 10 月 10 日
カテゴリ
ヘルプ センター および File Exchange で Image Thresholding についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!