I recently discovered beautiful things that can be achieved with AnatomyPlot3D. How can I apply this function to DICOM images from my local machine? Thanks in anticipation of your suggestions.
AnatomyPlot3D to plot anatomy entities, but it also works with other mesh primitives. DICOM images are slices so you could visualize them as an
Image3D, but not using
AnatomyPlot3D because you don't have a mesh.
For example, I used this dental sample DICOM of a class III malocclusion "underbite". First I unpacked the archive then I imported into Mathematica after sorting the file list properly:
dcmfiles = FileNames["Class-3-malocclusion\\Class 3 malocclusion\\DICOM\\I*"]; sortedfiles = SortBy[dcmfiles, ToExpression@ First@StringCases[Last@FileNameSplit@#, DigitCharacter ..] &]; slices = Import /@ sortedfiles; i3d = Image3D[slices, ColorFunction -> "XRay"]
To get it into a form appropriate for
AnatomyPlot3D we need to convert it into a mesh. You could use this tool: https://github.com/AOT-AG/DicomToMesh . Note you have to build it yourself on Windows. There's also Slicer. I had no luck with dicom2mesh so I tried Slicer but it was far too complicated for me as a first time user. Maybe you will have more success.
However, you can get a crude mesh out of Mathematica, and you can then feed this into
AnatomyPlot3D (beware this process is hideously slow):
mesh = ImageMesh[ImageResize[Threshold[i3d, 0.5], 200], Method -> "DualMarchingCubes"]