Converting MATLAB Isosurface into Triangulation object for .stl export
이전 댓글 표시
I am trying to build a code which can take a .tiff file with volumetric data, get a 3-D mesh representation and export that as a .stl geometry for use in COMSOL multiphysics.
I have gotten to the point where I have the face and vertices data from the isosurface function, and want to create a triangulation object(?) for use in stlwrite to export this format. However, when I try to use the face and vertices data, I get the error:
"
Error using indexing
The input must contain index values; entries with Inf, NaN, zero, negative, or fractional parts are not permitted.
Error in testing_dxl_file_conversion (line 62)
triangulationObj = triangulation(faces, vertices);
"
Code attached! It starts with a script to generate a test .tiff file composed of spheres within a volume (originally thought .dxf file conversion was possible, hence the name of the file).
댓글 수: 1
Fabio Freschi
2023년 10월 18일
When running your file, the following error appears
Unrecognized function or variable 'numFrames'.
Error in testing_dxl_file_conversion (line 44)
tiffStack = zeros(tiffInfo(1).Width, tiffInfo(1).Height, numFrames, 'uint16'); % Use the appropriate data type
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Scalar Volume Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
