Draw a bounding box for a 3D plot

4 Ansichten (letzte 30 Tage)
Mahesh Ganesan
Mahesh Ganesan am 21 Jul. 2020
Bearbeitet: Mahesh Ganesan am 31 Okt. 2020
Hi,
I am working on a skeletonization problem and have managed to extract the skeleton of a 3D image volume. The skeleton is a 3D logical matrix. I now want to plot the skeleton as a 3D plot and do so within a bounding box. An example of what I want to achieve is shown below. It is the table of contents image for this journal article. I request the MATLAB community to please advice on how to get a plot like this. Thank you,
Mahesh
  3 Kommentare
Tim
Tim am 30 Okt. 2020
See my answer to: https://www.mathworks.com/matlabcentral/answers/631624-3d-image-production?s_tid=srchtitle , that shows 2 methods. If you are using volshow there probably isn't an easy way using line objects other than editing the values of the voxel edges. Alternatively, if your volume is small or sparse enough (looks like yours is pretty sparse) you can use something like VOXview and set 'bounding_box' to true.
Mahesh Ganesan
Mahesh Ganesan am 31 Okt. 2020
Bearbeitet: Mahesh Ganesan am 31 Okt. 2020
Thanks for the suggestion, Tim. I will aim to give VOXview a try. Regardless, it seems to be a very useful function that might come handy. The inbuilt volshow does not offer as much control as VOXview provides.
My data are 3D arrays of the form M x N x P where M and N are 512 x 512 (mostly) and P varies anywhere from 200 - 500. The array is sparse as Tim identified. I couldn't get the final result that I wanted using any of the default 3D plotting methods in MATLAB. Instead, I followed the method of projections. I basically followed the example provided here : https://www.mathworks.com/help/matlab/ref/viewmtx.html
The perspective projection transform works great where I project both my skeleton points and the bounding box points onto a 2D plane. Adjusting the viewing angle then gets me to the final result, similar to the image I included in my original question above.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by