フィルターのクリア

finite element method for medical images

3 ビュー (過去 30 日間)
image-pro
image-pro 2023 年 5 月 30 日
コメント済み: image-pro 2024 年 4 月 9 日
I am trying to create fem mesh for MRI brain tumor image after labeling but shows error below.
Error using checkMeshIncompatible
Invalid input mesh. Neighboring mesh elements or mesh elements in one or more regions are not properly
connected.
Error in checkMeshValidity (line 49)
checkMeshIncompatible(elements(1:3,:)');
Error in pde.EquationModel/geometryFromMesh (line 126)
checkMeshValidity(nodes,elements,regions);
Error in untitled (line 17)
geometryFromMesh(model,verticesPatientMeters',faces');
The script is given below:
filepath = ("C:\Users\DELL\OneDrive\Documents\MATLAB\");
dataFolder = fullfile(filepath,"MedicalVolumeDICOMData","LabelData");
labelVol = medicalVolume("C:\Users\DELL\OneDrive\Documents\MATLAB\MedicalLabelingSession6\LabelData\8_19_2021_11_41_40_AM.nii");
R = labelVol.VolumeGeometry;
isovalue = 1;
[faces,vertices] = extractIsosurface(labelVol.Voxels,isovalue);
I = vertices(:,1);
J = vertices(:,2);
K = vertices(:,3);
[X,Y,Z] = intrinsicToWorld(R,I,J,K);
verticesPatient = [X Y Z];
verticesPatientMeters = verticesPatient.*10^-3;
triangul = triangulation(double(faces),double(verticesPatientMeters));
viewer = viewer3d;
surface = images.ui.graphics3d.Surface(viewer,data=triangul,Color=[1 0 0],Alpha=1);
model = createpde(3);
geometryFromMesh(model,verticesPatientMeters',faces');
pdegplot(model,FaceLabels="on")
  2 件のコメント
Brian McDonnell
Brian McDonnell 2024 年 4 月 9 日
Hi did you find a solution for this? I'm also getting some similar errors with a mesh generated in tetGen. I'm confident after some extensive checking that the mesh is fine. I've been using checkMeshIncompatible to try and troubleshoot the issue but no luck.
image-pro
image-pro 2024 年 4 月 9 日
I have changed isovalue=0.12 then this error removed. But when running this code of line geometryFromMesh(model,verticesPatientMeters',faces') Then get another error. And when replace verticesPatientMeters to vertices then work fine but results are not accurate. If you have any solution plz reply as soon s possible thank in advance.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMRI についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by