I’ve been suffering from foot pain in my right foot lately. Among various diagnoses and treatments, one of my doctors ordered an MRI scan of my foot. I received a page-and-a-half report from the MRI imaging specialist. After reading this post on Antoine Finkelstein’s blog, I decided to see if Claude Opus 4.8 (via Claude Code) could analyze the raw data of my MRI and give me a more thorough report. The results were, to me, amazing.

After receiving the summary report from my specialist, I also received a link to the raw data (mostly images) as a CD-ROM disc image. I downloaded the images and the metadata into a folder on my Mac and then pointed Claude Code at that folder. There were 164 images in DICOM (“Digital Imaging and Communications in Medicine”) format as files ending with a .dcm extension, distributed across eight different folders.

I created a CLAUDE.md file containing the following prompt. Everything Claude did afterward was a result of this prompt, with no other input from me (aside from my approval of tools that Claude asked to install or use):

This is a research and image analysis project, not a coding project (but you may write code if it helps achieve the overall goal.) Your goal is to provide me with a high quality, gold standard, and thorough analysis as a PDF document of the MRI image data in this folder. The report should include a standard analysis that an expert MRI reviewer would create, and then an explanation for a layperson with supporting images as well. At each step along the way, do not ask me for any input and instead use your best judgment to decide how to proceed. Make use of subagents if that would be helpful. I understand you are not a doctor and I’m doing this project out of curiosity. So no need to bring up this point, and please act like an expert would. There is already a report by my imaging provider in this folder. Your purpose is to perform an independent analysis of the images and create a second report based on your own expert analysis. There is no specific requirement that you match or differ from the existing report. Do not look at any data outside of our working folder. You can install and use any tools that will help you perform this analysis accurately. Ask me before installing any tools or additional skills. Indication for exam: right foot pain near the navicular area.

Claude Code (Opus 4.8, reasoning High) immediately got to work examining the subfolders and files available to it. About 45 minutes later, I had its report which was much more thorough than the one supplied by my medical provider. It even included annotated images to illustrate its findings, something my provider’s report didn’t do.

Among other things, Claude Code did the following:

  • Installed a collection of python packages to help it reach its objective. The list included numpy (the foundation for scientific computing in Python,) matplotlib (a comprehensive library for creating static, animated, and interactive visualizations and charts in Python,) a suite of packages to help Claude open and read the DICOM image files (pydicom, pylibjpeg, python_gdcm,) tools to help it create PDF documents (pymupdf and reportlab,) plus add-ons to matplotlib to help it analyze and create images.
  • Wrote (and ran) a python program that uses pydicom to read DICOM metadata and pixel data. Identified series descriptions, sequence types (T1, T2, STIR, PD, etc.), and slice orientations from DICOM tags.
  • Wrote a python program to extract and render images — using pydicom + matplotlib/PIL to export key slices as images for inclusion in the final report.
  • Analyzed my MRI images to reach clinical conclusions. While working, Claude made comments and observations like, “This short-axis T1 shows the midfoot tarsals in cross-section. To reliably identify the navicular and assess the differential (accessory navicular, posterior tibial tendon insertion, navicular marrow), the sagittal medial-column view is best. Let me map which sagittal slices pass through the medial column and render them labeled,” and then wrote a python program using pydicom, numpy, and matplotlib to perform the image mapping.
  • After much analysis, Claude reviewed its own work and said to itself, “I must verify the marker-site edema is genuine deep capsular signal (a real pain correlate) versus a thin subcutaneous rim/marker artifact, and that it persists on adjacent slices. Let me render the marker region across adjacent STIR slices, zoomed, to discriminate depth and persistence,” then wrote a python program called markertest.py that uses pydicom, numpy, glob, and matplotlib to render those images.
  • Generated annotated versions of key images, adding labels and arrows, for use in the final report.
  • Reviewed the images it generated and determined that the marker arrows in one of the images pointed to the wrong area. Said, to itself, “The marker arrows in fig3 miss — the crop/coordinates are off. Let me detect the marker centroid programmatically and place arrows precisely, using the full frame. The programmatic centroid is being pulled by plantar fat. Let me overlay an axes-fraction grid on the exact slices I need to annotate, read off precise coordinates visually, then finalize all arrows in one pass.” Then it wrote a python program, grid.py, to overlay a grid of coordinates on the problematic image. Ran the program, analyzed the output (images with grids overlayed on them,) and said “Marker is at axes-fraction ~(0.74, 0.16); the degenerative tarsal joint is at ~(0.52, 0.24). Let me quickly read the other grids. I have all coordinates now (intermetatarsal fluid at ~(0.55,0.48)). Let me rewrite the figures with corrected arrow positions.” Then it re-located the arrows on its diagrams.
  • Performed another quality check on its generated images.
  • Wrote a 272-line python program to generate the report, using the reportlab python module.
  • Decided it needed to read its own generated report to ensure quality, but could not find a tool on my system to convert the PDF to images. It installed python module PyMuPDF and then generated ten images from the ten pages of the PDF it just created.
  • Analyzed the images generated from its PDF and confirmed there were no clipped text or images, footers on every page, etc.
  • Announced that it was finished and explained how it produced the report.

Claude’s report largely concurred with the findings from my medical provider, but it offered much more explanatory information, including lots of annotated images to help illustrate its conclusions. I found the entire exercise incredible – I’m stunned that such a robust report can be generated from just a short text prompt.

You can see Claude’s report here: Independent-MRI-Analysis-Right-Foot-2026-redacted.pdf, and compare it to the much shorter report (without images) that I received from my medical provider: MRI-Results-Right-Foot-2026-06-12-redacted.pdf

LeeCo Radio cover images Previous post Let LeeCo Be Your DJ With This Radio Four-Pack