finite element method for medical images

8 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by