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
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!