フィルターのクリア

Convert a xyz surface into a 3D array?

3 ビュー (過去 30 日間)
Nathan Orloff
Nathan Orloff 2014 年 2 月 20 日
編集済み: Sean de Wolski 2014 年 2 月 20 日
I have a the following input:
surface = struct('vertices', [....],'faces',[....];
Which I can draw as:
patch(surface)
But what I need is a 3D logical array, where the contained volumes are true.
Is there a quick way to do this?

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 2 月 20 日
編集済み: Sean de Wolski 2014 年 2 月 20 日
Edit per clarification
Use this utility from the File Exchange:
  2 件のコメント
Nathan Orloff
Nathan Orloff 2014 年 2 月 20 日
Thanks for the comment.
I use:
Then I create a structure:
mysurface = struct('vertices', n_verts,'faces',n_faces);
Where n_verts and n_faces are vectors. n_verts are the xyz points for all of the vertices. n_verts is a 3 x N vector where N is the number of vertices. n_faces is also a 3 x N vector. When I call:
patch(mysurface)
It creates 3D image of my surface.
I want to create a 3D logical array where the 1's are the regions contained in the surface. This way I can use bwlabel and all the other image processing tricks on my surface.
Is this clear?
Sean de Wolski
Sean de Wolski 2014 年 2 月 20 日
編集済み: Sean de Wolski 2014 年 2 月 20 日
Ahh, gotcha. I was thinking the other direction (i.e. given a logical volume, get the struct).
See edits

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by