How to fill an empty volume in a 3D matrix?
5 次查看(过去 30 天)
显示 更早的评论
Hi everyone!
I have a huge 3D binary matrix representing a single empty volume. To process it, I need to fill the volume with ones to make it a solid volume, but I haven't been able to do that. The floodfill algorithm I've made doesn't work on it and the array seems to be too big for others I've found online. I also have the same image in wavefront format so as a list of vertices and faces.
Can anyone help me? either by suggesting a way to fill the volume or software I could use to convert the wavefront file into a filled volume.?
Thanks,
Frank
0 个评论
回答(2 个)
Sean de Wolski
2012-8-10
What do you mean you want to fill it with ones?
BW = false(10,10,10);
BW(3:6,3:6,3:6) = true;
It is an empty volume with a 4x4x4 cube in the middle. I assume you want something more practical than this though.
0 个评论
Sumit Tandon
2012-8-10
I haven't tried it, but assuming the empty shell to be fully connected, ie there are no "holes" in it, you could use the IMFILL command from Image Processing Toolbox to fill up the volume.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!