3
$\begingroup$

I would like to get a 3D mesh of an organ, let us say the right adrenal gland, for use in NDSolveValue for solving a series of pdes. My question here focuses on obtaining the mesh from the 3D image. The image can be obtained by:

img = AnatomyPlot3D[
   Entity["AnatomicalStructure", "RightAdrenalGland"]];

I have tried to use ImageMesh[img]to obtain the 3D mesh, however, the output is 2D (despite the documentation indicating that ImageMesh is capable of providing 3D meshes for 3D images) and incorrectly identifies part of the organ as background (output shown below).

Graphic of ImageMesh output

Alternatively, I have also tried using ClusteringComponents[img,2] with the assumption that the resulting 2 components will be background and the adrenal gland, however, the output is superficially 3D (Head[ClusteringComponents[img,2]//Colorize] is Image3D) but the output is essentially a 2D image (which I presume cannot be used to construct a 3D mesh) and also incorrectly identifies part of the organ as equivalent to the background (shown below).

Output of ClusteringComponents[img,2]//Colorize

In light of the above, is there a way to generate a 3D mesh from the AnatomyPlot3D image OR a way to obtain an already constructed mesh ( I add this part as running AnatomyData[ Entity["AnatomicalStructure", "RightAdrenalGland"], "RegionBounds"] outputs {{-62.534, -30.63}, {-102.34, -75.106}, {1045.5, 1087.8}} as the x, y, and z region bounds which I understand to mean a mesh could already exist and then just needs to be accessed. Thank you in advance for any and all assistance.

$\endgroup$

2 Answers 2

6
$\begingroup$

You'd need to use

DiscretizeGraphics[img]

enter image description here

because AnatomyPlot3D returns a Graphics3D and not a 3D image.

$\endgroup$
3
  • $\begingroup$ Thank you so much for the solution - I seem to have just missed this function entirely. Much appreciated. I have marked this as the solution. $\endgroup$
    – Joel
    Mar 12 at 15:03
  • $\begingroup$ @Joel, out of curiosity, what type of PDE do you want to solve? $\endgroup$
    – user21
    Mar 12 at 16:04
  • 1
    $\begingroup$ I plan to solve a diffusion style pde (so Laplacian) $\endgroup$
    – Joel
    Mar 13 at 8:58
4
$\begingroup$

We can get a mesh through a built in property:

Entity["AnatomicalStructure", "RightAdrenalGland"]["MeshRegion"]

or equivalently

AnatomyData["RightAdrenalGland", "MeshRegion"]

$\endgroup$
1
  • $\begingroup$ Thank you very much for your answer, it seems I got fixated on going straight to the 3D image (actually graphic as pointed out in the accepted answer) and working to the mesh from there (and bypassed this entirely). Thanks again for the answer. $\endgroup$
    – Joel
    Mar 13 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.