Hi,
I have this volume in 3D which is displayed using “volshow“:
As can be seen there are some outlier voxels that are undesireable. Is there any way that I can only retain the largets element in the volume and ignore the rest? Similar to “bwareafilt(img, 1)“ ?
I tried to use the new “bwmorph3(vol, 'majority')“ and it did clean it up a bit, but still leave some voxels behind. (The above volshow is after the bwmorph3 majority operation).
Any way to accomplish this?
I'm currently using Matlab 2018b, but am happy to upgrade if any helpful 3D function was introduced later.
update:
I think regionprops3 is what will work for me, I tried regionprops3(vol, 'Volume') on the above image and got this returned
378246124161602201315321241522038747218278516101216137687815012648
I think the volume 2038747 relates to the largest object (at index 12).
How do I use this to retain only this volume?
Thanks
Best Answer