Find radiological images and try to include MRI, CT, and X-ray images for a particular limb, let's take upper limb right now, and discuss different diseases and which modality to use, when and why.
| Modality | Best For | Limitations |
|---|---|---|
| X-ray (Plain Radiograph) | Bones, fractures, alignment, arthritis, calcification | No soft tissue detail; misses early or occult fractures |
| CT | Complex fracture geometry, bony detail, surgical planning, articular cartilage (with contrast) | Radiation; poor soft-tissue contrast without arthrography |
| MRI | Tendons, ligaments, cartilage, labrum, bone marrow oedema, nerve compression | Slow, expensive, limited in acute trauma triage |







| Clinical Scenario | First Line | Second Line | Avoid / Less Useful |
|---|---|---|---|
| Acute trauma (fracture suspected) | X-ray | CT (complex fractures) | MRI (unless occult fx) |
| Occult scaphoid fracture | X-ray | MRI (gold standard) | CT misses marrow oedema |
| Rotator cuff tear | X-ray (exclude arthritis) | MRI | CT |
| Labral tears (SLAP, Bankart) | - | MRI arthrography | Plain MRI less sensitive |
| Tendinopathy (tennis/golfer's elbow) | Ultrasound | MRI | CT |
| OCD capitellum - stability | MRI | CT arthrography | Plain X-ray (late only) |
| TFCC tear | - | MRI arthrography | CT |
| Elbow OA / loose bodies | X-ray | CT arthrography | MRI (less spatial res.) |
| RA hand monitoring | X-ray (serial) | MRI (early disease) | CT |
| Carpal tunnel syndrome | Ultrasound | MRI (mass lesion) | CT |
| Complex periarticular fracture | X-ray | CT | MRI acutely |
| Bone tumour / AVN | X-ray | MRI | CT (supplementary) |
Now create PPT for this. Make it look elegant, don't use harsh or bright colors. Make it subtle and easy to look for and professional. Also use creative fonts which look elegant.
mkdir -p /home/daytona/workspace/upper-limb-radiology && node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/8d9891c2e5b7ef9e5473e8349c1a16ffbdd0dac1b32c00e8f8bd8c6934fa1d65.png" \ "https://cdn.orris.care/cdss_images/2e501b34e02dd852db74c40e7ed43273ed8f7c7cdb7b86ee7135043fbd2c1b1a.png" \ "https://cdn.orris.care/cdss_images/4b73b78dd5c6218fbcaa4f136af661c64a16d01e54217b36712133df08810a44.png" \ "https://cdn.orris.care/cdss_images/4be49b129288ae9998907f4e33179ea508bc5debf2c3b7d82d92961557f56338.png" \ "https://cdn.orris.care/cdss_images/bf9f5b1c7284a60fbf5ecb2300524df1803161582b3370ca8dfa4030d443a87c.png" \ "https://cdn.orris.care/cdss_images/1ddd43bd7ce88860d15f1a573e7a2b00880aee15a314e97e98fdae487946d62a.png" \ "https://cdn.orris.care/cdss_images/12f0bb51c68eeb2363e18344da9a302498fef4cfb43bc6934a36393c2cff7668.png" \ > /home/daytona/workspace/upper-limb-radiology/images.json 2>&1 echo "Exit: $?" wc -c /home/daytona/workspace/upper-limb-radiology/images.json
~/upper-limb-radiology/build.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// ─── Load images ────────────────────────────────────────────────────────────
const images = JSON.parse(fs.readFileSync("/home/daytona/workspace/upper-limb-radiology/images.json"));
const img = (i) => images[i].base64; // returns "image/png;base64,..."
// ─── Colour palette (muted, elegant, medical) ───────────────────────────────
// Dominant: deep slate-charcoal #1C2B3A
// Mid: warm parchment #F5F0E8
// Accent: dusty teal #4A8FA8
// Text: near-black #1A1A2E
// Light accent: sage #7DA5A0
// Divider / subtle: #D6CFC4
const C = {
dark: "1C2B3A", // title backgrounds
parch: "F5F0E8", // main content bg
teal: "4A8FA8", // accent stripe, headings
sage: "7DA5A0", // secondary accent
text: "2C2C3E", // body text
white: "FAFAF7", // text on dark bg
mist: "E8E2D9", // card backgrounds
divider: "C4B9AB", // dividers
gold: "B89A6A", // subtle warm accent
};
// ─── Create presentation ────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Upper Limb Radiology";
pres.author = "Orris Medical";
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark background
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
// Subtle left accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.06, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
// Right decorative panel (lighter dark)
s.addShape(pres.shapes.RECTANGLE, { x: 6.8, y: 0, w: 3.2, h: 5.625, fill: { color: "15222E" }, line: { color: "15222E" } });
// Horizontal thin gold line
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 2.72, w: 5.8, h: 0.025, fill: { color: C.gold }, line: { color: C.gold } });
// Title text
s.addText("UPPER LIMB", {
x: 0.5, y: 1.0, w: 6.0, h: 0.85,
fontSize: 44, fontFace: "Georgia", bold: true,
color: C.white, align: "left", charSpacing: 4, margin: 0
});
s.addText("RADIOLOGY", {
x: 0.5, y: 1.85, w: 6.0, h: 0.85,
fontSize: 44, fontFace: "Georgia", bold: false,
color: C.teal, align: "left", charSpacing: 8, margin: 0
});
// Subtitle
s.addText("MRI · CT · X-Ray", {
x: 0.5, y: 2.9, w: 6.0, h: 0.45,
fontSize: 16, fontFace: "Palatino Linotype", italic: true,
color: C.divider, align: "left", charSpacing: 3, margin: 0
});
s.addText("Imaging Modalities Across Upper Limb Pathologies", {
x: 0.5, y: 3.38, w: 6.0, h: 0.38,
fontSize: 13, fontFace: "Palatino Linotype",
color: "8A9BB0", align: "left", margin: 0
});
// Right panel content — region list
s.addText("REGIONS COVERED", {
x: 7.05, y: 0.55, w: 2.8, h: 0.35,
fontSize: 9, fontFace: "Calibri", bold: true,
color: C.teal, align: "left", charSpacing: 3, margin: 0
});
const regions = ["Shoulder", "Elbow", "Wrist & Hand"];
regions.forEach((r, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 7.05, y: 1.05 + i * 0.52, w: 0.025, h: 0.32, fill: { color: C.gold }, line: { color: C.gold } });
s.addText(r, {
x: 7.2, y: 1.05 + i * 0.52, w: 2.5, h: 0.32,
fontSize: 15, fontFace: "Palatino Linotype", italic: true,
color: C.white, align: "left", margin: 0
});
});
// Bottom source tag
s.addText("Source: Grainger & Allison's Diagnostic Radiology · Imaging Anatomy Vol. 3", {
x: 0.5, y: 5.22, w: 9, h: 0.25,
fontSize: 8, fontFace: "Calibri", color: "4A5A6A", align: "left", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Modality Overview (comparison table-style)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.parch }, line: { color: C.parch } });
// Header stripe
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.85, w: 10, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("THE THREE MODALITIES", {
x: 0.4, y: 0.12, w: 9, h: 0.6,
fontSize: 22, fontFace: "Georgia", bold: true,
color: C.white, align: "left", charSpacing: 3, margin: 0
});
s.addText("Understanding when and why to use X-Ray, CT, and MRI", {
x: 0.4, y: 0.55, w: 9, h: 0.28,
fontSize: 11, fontFace: "Palatino Linotype", italic: true,
color: C.sage, align: "left", margin: 0
});
// Three cards
const cards = [
{
title: "X-RAY",
subtitle: "Plain Radiograph",
color: "5C7A8E",
icon: "⊞",
best: ["Fractures & dislocations", "Joint alignment & space", "Arthritis & calcification", "Bony enthesophytes"],
limit: "No soft-tissue detail\nMisses occult fractures"
},
{
title: "CT SCAN",
subtitle: "Computed Tomography",
color: "4A8FA8",
icon: "◎",
best: ["Complex fracture geometry", "Articular surface detail", "Surgical planning", "CT arthrography (cartilage)"],
limit: "Ionising radiation\nPoor soft-tissue without contrast"
},
{
title: "MRI",
subtitle: "Magnetic Resonance",
color: "3D7A6E",
icon: "◈",
best: ["Tendons & ligaments", "Labrum & cartilage", "Bone marrow oedema", "Nerve compression"],
limit: "Slow & expensive\nLimited in acute triage"
}
];
cards.forEach((c, i) => {
const x = 0.25 + i * 3.25;
// Card bg
s.addShape(pres.shapes.RECTANGLE, {
x, y: 1.1, w: 3.0, h: 4.2,
fill: { color: "FFFFFF" }, line: { color: C.divider, pt: 0.5 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.08 }
});
// Top color bar
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.1, w: 3.0, h: 0.5, fill: { color: c.color }, line: { color: c.color } });
// Title
s.addText(c.title, {
x: x + 0.15, y: 1.12, w: 2.7, h: 0.28,
fontSize: 14, fontFace: "Georgia", bold: true,
color: "FFFFFF", align: "left", charSpacing: 2, margin: 0
});
s.addText(c.subtitle, {
x: x + 0.15, y: 1.40, w: 2.7, h: 0.2,
fontSize: 9, fontFace: "Palatino Linotype", italic: true,
color: "D0D8E0", align: "left", margin: 0
});
// "Best for" label
s.addText("BEST FOR", {
x: x + 0.15, y: 1.72, w: 2.7, h: 0.22,
fontSize: 8, fontFace: "Calibri", bold: true,
color: c.color, charSpacing: 2, margin: 0
});
// Bullet items
c.best.forEach((b, j) => {
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.18, y: 1.97 + j * 0.42, w: 0.04, h: 0.04, fill: { color: c.color }, line: { color: c.color } });
s.addText(b, {
x: x + 0.28, y: 1.92 + j * 0.42, w: 2.6, h: 0.35,
fontSize: 10, fontFace: "Calibri", color: C.text, margin: 0, valign: "middle"
});
});
// Divider
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.15, y: 3.66, w: 2.7, h: 0.015, fill: { color: C.divider }, line: { color: C.divider } });
// Limitation
s.addText("LIMITATION", {
x: x + 0.15, y: 3.72, w: 2.7, h: 0.2,
fontSize: 8, fontFace: "Calibri", bold: true,
color: "A09080", charSpacing: 2, margin: 0
});
s.addText(c.limit, {
x: x + 0.15, y: 3.92, w: 2.7, h: 0.55,
fontSize: 9.5, fontFace: "Calibri", color: "7A7060", italic: true, margin: 0
});
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — Shoulder: X-Ray (Enthesophyte + Arthropathy)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.parch }, line: { color: C.parch } });
// Left dark panel
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 4.2, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 4.2, y: 0, w: 0.04, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
// Section tag
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.32, w: 1.1, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SHOULDER", {
x: 0.35, y: 0.32, w: 1.1, h: 0.28,
fontSize: 8, fontFace: "Calibri", bold: true,
color: C.white, align: "center", charSpacing: 2, margin: 0
});
s.addText("X-Ray", {
x: 0.35, y: 0.72, w: 3.6, h: 0.55,
fontSize: 32, fontFace: "Georgia", bold: false,
color: C.white, margin: 0
});
s.addText("Plain Radiograph of the Shoulder", {
x: 0.35, y: 1.28, w: 3.6, h: 0.32,
fontSize: 12, fontFace: "Palatino Linotype", italic: true,
color: C.sage, margin: 0
});
// Gold divider
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.7, w: 3.4, h: 0.025, fill: { color: C.gold }, line: { color: C.gold } });
// Bullet points
const bullets = [
["Bony enthesophytes", "Acromion / greater tuberosity spurs on AP view drive impingement."],
["Subacromial space", "Narrowing <7 mm = specific sign of full-thickness cuff tear."],
["Rotator cuff arthropathy", "Superior humeral migration → femorisation of humeral head."],
["When to use", "Always first-line. Fast, inexpensive, excellent bony overview."]
];
bullets.forEach(([title, body], i) => {
s.addText(title, {
x: 0.35, y: 1.85 + i * 0.82, w: 3.6, h: 0.3,
fontSize: 11, fontFace: "Calibri", bold: true,
color: C.gold, margin: 0
});
s.addText(body, {
x: 0.35, y: 2.12 + i * 0.82, w: 3.6, h: 0.45,
fontSize: 10, fontFace: "Calibri",
color: "B0BFCA", margin: 0
});
});
// Images — two X-rays side by side
s.addImage({ data: img(0), x: 4.38, y: 0.25, w: 2.62, h: 2.56 });
s.addImage({ data: img(1), x: 7.12, y: 0.25, w: 2.62, h: 2.56 });
// Captions
s.addShape(pres.shapes.RECTANGLE, { x: 4.38, y: 2.82, w: 2.62, h: 0.55, fill: { color: "EDEDEA" }, line: { color: C.divider } });
s.addText("Fig. 39.1 — Subacromial enthesophyte on the lateral acromion (AP view)", {
x: 4.45, y: 2.84, w: 2.48, h: 0.5,
fontSize: 8, fontFace: "Calibri", italic: true, color: "6A6560", margin: 0
});
s.addShape(pres.shapes.RECTANGLE, { x: 7.12, y: 2.82, w: 2.62, h: 0.55, fill: { color: "EDEDEA" }, line: { color: C.divider } });
s.addText("Fig. 39.2 — Rotator cuff arthropathy: superior humeral migration (AP view)", {
x: 7.19, y: 2.84, w: 2.48, h: 0.5,
fontSize: 8, fontFace: "Calibri", italic: true, color: "6A6560", margin: 0
});
// Bottom summary box
s.addShape(pres.shapes.RECTANGLE, { x: 4.38, y: 3.52, w: 5.38, h: 1.85, fill: { color: "F0EBE2" }, line: { color: C.divider, pt: 0.5 } });
s.addShape(pres.shapes.RECTANGLE, { x: 4.38, y: 3.52, w: 0.05, h: 1.85, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Clinical Context", {
x: 4.55, y: 3.6, w: 5.0, h: 0.3,
fontSize: 11, fontFace: "Georgia", bold: true, color: C.teal, margin: 0
});
s.addText(
"Impingement is the most common cause of rotator cuff tears in patients over 40. X-ray is mandatory before any further imaging. It reveals acromial shape, AC joint spurs, and calcific deposits within tendons (calcific tendinopathy). Marked subacromial narrowing with humeral head contact against the acromion is pathognomonic of chronic rotator cuff arthropathy.",
{
x: 4.55, y: 3.94, w: 5.0, h: 1.3,
fontSize: 9.5, fontFace: "Calibri", color: C.text, margin: 0
}
);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Shoulder: MRI (Rotator Cuff Tear + SLAP)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.parch }, line: { color: C.parch } });
// Header stripe
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.82, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.82, w: 10, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.15, w: 1.05, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SHOULDER", {
x: 0.35, y: 0.15, w: 1.05, h: 0.28,
fontSize: 8, fontFace: "Calibri", bold: true, color: C.white, align: "center", charSpacing: 2, margin: 0
});
s.addText("MRI — Magnetic Resonance Imaging", {
x: 1.55, y: 0.18, w: 7, h: 0.5,
fontSize: 22, fontFace: "Georgia", bold: true, color: C.white, margin: 0
});
// Two image columns
// Left: Full-thickness tear
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 1.0, w: 4.5, h: 4.35, fill: { color: "FFFFFF" }, line: { color: C.divider, pt: 0.5 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.08 }
});
s.addText("Full-Thickness Supraspinatus Tear", {
x: 0.4, y: 1.08, w: 4.2, h: 0.32,
fontSize: 12, fontFace: "Georgia", bold: true, color: C.teal, margin: 0
});
s.addImage({ data: img(2), x: 0.4, y: 1.44, w: 4.18, h: 2.4 });
s.addText(
"Coronal oblique T2 fat-sat MRI. High-signal fluid fills the supraspinatus defect (white arrow). Fluid in both the GHJ and subacromial bursa confirms full-thickness communication — pathognomonic of a complete tear.",
{
x: 0.4, y: 3.88, w: 4.18, h: 1.05,
fontSize: 8.5, fontFace: "Calibri", color: C.text, margin: 0
}
);
// Right: SLAP tear
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 1.0, w: 4.7, h: 4.35, fill: { color: "FFFFFF" }, line: { color: C.divider, pt: 0.5 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.08 }
});
s.addText("SLAP Tear — MR Arthrography", {
x: 5.2, y: 1.08, w: 4.4, h: 0.32,
fontSize: 12, fontFace: "Georgia", bold: true, color: C.teal, margin: 0
});
s.addImage({ data: img(3), x: 5.2, y: 1.44, w: 4.38, h: 2.4 });
s.addText(
"Coronal FS T2 MR arthrogram. High-signal gadolinium contrast extends into the superior labrum (arrow) confirming a SLAP tear. MR arthrography is the gold standard — it distends the joint, driving contrast into subtle labral clefts that plain MRI misses.",
{
x: 5.2, y: 3.88, w: 4.38, h: 1.05,
fontSize: 8.5, fontFace: "Calibri", color: C.text, margin: 0
}
);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Shoulder: MRI AC Joint + Modality Decision
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
// Right side lighter panel
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 0, w: 4.8, h: 5.625, fill: { color: "182430" }, line: { color: "182430" } });
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 0, w: 0.04, h: 5.625, fill: { color: C.gold }, line: { color: C.gold } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.3, w: 1.05, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SHOULDER", {
x: 0.35, y: 0.3, w: 1.05, h: 0.28,
fontSize: 8, fontFace: "Calibri", bold: true, color: C.white, align: "center", charSpacing: 2, margin: 0
});
s.addText("AC Joint Disruption", {
x: 0.35, y: 0.72, w: 4.5, h: 0.55,
fontSize: 26, fontFace: "Georgia", color: C.white, margin: 0
});
s.addText("MRI for Soft-Tissue Assessment", {
x: 0.35, y: 1.28, w: 4.5, h: 0.3,
fontSize: 12, fontFace: "Palatino Linotype", italic: true, color: C.sage, margin: 0
});
s.addImage({ data: img(5), x: 0.3, y: 1.72, w: 4.7, h: 3.5 });
// Right: Shoulder modality decision chart
s.addText("Shoulder Imaging", {
x: 5.4, y: 0.3, w: 4.2, h: 0.52,
fontSize: 22, fontFace: "Georgia", bold: true, color: C.white, margin: 0
});
s.addText("Modality Selection Guide", {
x: 5.4, y: 0.82, w: 4.2, h: 0.28,
fontSize: 11, fontFace: "Palatino Linotype", italic: true, color: C.sage, margin: 0
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.4, y: 1.18, w: 4.2, h: 0.025, fill: { color: C.gold }, line: { color: C.gold } });
const decisions = [
["X-Ray", "First-line for ALL shoulder presentations — bony architecture, impingement, arthritis"],
["MRI", "Rotator cuff disease — tendon tears, bursitis, tendinopathy with near 100% accuracy"],
["MR Arthrography", "Instability lesions — SLAP, Bankart, labral tears (superior sensitivity)"],
["CT", "Complex fractures (e.g. glenoid rim, humeral head), pre-surgical planning"],
["CT Arthrography", "Metallic implants present; alternative to MR arthrography"],
];
decisions.forEach(([mod, desc], i) => {
const y = 1.32 + i * 0.82;
s.addShape(pres.shapes.RECTANGLE, { x: 5.4, y, w: 4.2, h: 0.72,
fill: { color: i % 2 === 0 ? "1E3348" : "192B3B" }, line: { color: "2A3F52", pt: 0.4 }
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.4, y, w: 0.04, h: 0.72, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(mod, {
x: 5.52, y: y + 0.06, w: 4.0, h: 0.26,
fontSize: 11, fontFace: "Calibri", bold: true, color: C.gold, margin: 0
});
s.addText(desc, {
x: 5.52, y: y + 0.33, w: 4.0, h: 0.34,
fontSize: 9.5, fontFace: "Calibri", color: "9AABB8", margin: 0
});
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Elbow: CT (OA + OCD)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.parch }, line: { color: C.parch } });
// Header
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.82, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.82, w: 10, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.15, w: 0.85, h: 0.28, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("ELBOW", {
x: 0.35, y: 0.15, w: 0.85, h: 0.28,
fontSize: 8, fontFace: "Calibri", bold: true, color: C.dark, align: "center", charSpacing: 2, margin: 0
});
s.addText("CT — Computed Tomography of the Elbow", {
x: 1.32, y: 0.18, w: 8, h: 0.5,
fontSize: 22, fontFace: "Georgia", bold: true, color: C.white, margin: 0
});
// Main CT image (large)
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 1.0, w: 5.6, h: 4.35, fill: { color: "111111" }, line: { color: "333333", pt: 0.5 } });
s.addImage({ data: img(4), x: 0.3, y: 1.08, w: 5.5, h: 3.2 });
s.addText("Fig. 39.24 — CT Elbow: OA and CT Arthrography", {
x: 0.35, y: 4.3, w: 5.5, h: 0.25,
fontSize: 9, fontFace: "Georgia", italic: true, bold: true, color: C.gold, margin: 0
});
s.addText(
"(A) Axial CT: olecranon osteophyte in early osteoarthritis. (B) Sagittal CT arthrogram: non-radiopaque chondral loose body in the posterior recess (white arrow).",
{
x: 0.35, y: 4.56, w: 5.5, h: 0.62,
fontSize: 9, fontFace: "Calibri", color: "606060", margin: 0
}
);
// Right: key points
const ctPoints = [
["Fractures", "Multiplanar CT reconstructions for radial head fractures, supracondylar, and complex elbow injuries. Defines articular step-off for surgical planning."],
["OCD of Capitellum", "CT arthrography assesses osteochondral fragment stability. High spatial resolution confirms cartilage integrity — critical for operative decision."],
["Osteoarthritis", "Loose body detection: radiolucent chondral bodies invisible on X-ray are revealed by intra-articular contrast on CT arthrography."],
["Why CT over MRI?", "Faster in acute settings, superior bony resolution, excellent for metallic implants, and enables guided arthrography simultaneously."]
];
ctPoints.forEach(([title, body], i) => {
const y = 1.05 + i * 1.12;
s.addShape(pres.shapes.RECTANGLE, { x: 6.1, y, w: 3.65, h: 1.0,
fill: { color: i % 2 === 0 ? "FFFFFF" : "F0EBE2" }, line: { color: C.divider, pt: 0.5 }
});
s.addShape(pres.shapes.RECTANGLE, { x: 6.1, y, w: 0.04, h: 1.0, fill: { color: C.gold }, line: { color: C.gold } });
s.addText(title, {
x: 6.22, y: y + 0.07, w: 3.4, h: 0.28,
fontSize: 11, fontFace: "Calibri", bold: true, color: C.teal, margin: 0
});
s.addText(body, {
x: 6.22, y: y + 0.35, w: 3.4, h: 0.6,
fontSize: 9, fontFace: "Calibri", color: C.text, margin: 0
});
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — Wrist: MRI (TFCC tear)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.06, h: 5.625, fill: { color: C.sage }, line: { color: C.sage } });
// Right image half
s.addImage({ data: img(6), x: 4.8, y: 0.1, w: 5.0, h: 5.4 });
// Overlay gradient-feel using semi-transparent rect
s.addShape(pres.shapes.RECTANGLE, { x: 4.8, y: 0, w: 0.6, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
// Left content
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.35, w: 1.1, h: 0.28, fill: { color: C.sage }, line: { color: C.sage } });
s.addText("WRIST", {
x: 0.35, y: 0.35, w: 1.1, h: 0.28,
fontSize: 8, fontFace: "Calibri", bold: true, color: C.white, align: "center", charSpacing: 2, margin: 0
});
s.addText("MRI", {
x: 0.35, y: 0.78, w: 4.2, h: 0.65,
fontSize: 42, fontFace: "Georgia", bold: false, color: C.white, margin: 0
});
s.addText("Triangular Fibrocartilage\nComplex (TFCC) Tear", {
x: 0.35, y: 1.46, w: 4.2, h: 0.7,
fontSize: 16, fontFace: "Palatino Linotype", italic: true, color: C.sage, margin: 0
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 2.25, w: 3.8, h: 0.025, fill: { color: C.gold }, line: { color: C.gold } });
const wristPoints = [
["TFC anatomy", "Cartilaginous disc between distal radius, ulna and carpal bones. Stabilises the DRUJ."],
["Central (degenerative)", "Age-related perforation. MR arthrography shows contrast filling the defect. Usually not repaired."],
["Peripheral (traumatic)", "Ulnar styloid avulsion. Surgically repairable. Requires MR arthrography to distinguish."],
["Why MRI?", "The TFC is invisible on X-ray. CT cannot characterize fibrocartilage. MRI / MR arthrography is the gold standard."],
];
wristPoints.forEach(([title, body], i) => {
s.addText(title, {
x: 0.35, y: 2.4 + i * 0.77, w: 4.0, h: 0.28,
fontSize: 11, fontFace: "Calibri", bold: true, color: C.gold, margin: 0
});
s.addText(body, {
x: 0.35, y: 2.66 + i * 0.77, w: 4.0, h: 0.42,
fontSize: 9.5, fontFace: "Calibri", color: "9AABB8", margin: 0
});
});
// Caption over image
s.addShape(pres.shapes.RECTANGLE, { x: 5.45, y: 4.88, w: 4.35, h: 0.62, fill: { color: "0D1B27" }, line: { color: "0D1B27" } });
s.addText("Fig. 39.34 — Coronal MR arthrogram wrist: central TFC defect (curved arrow) with high-signal contrast, associated OA changes and subchondral cyst in distal ulna.", {
x: 5.52, y: 4.92, w: 4.22, h: 0.56,
fontSize: 8, fontFace: "Calibri", italic: true, color: "8A9BAA", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — Disease Summary Grid (all regions)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.parch }, line: { color: C.parch } });
// Header
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.dark }, line: { color: C.dark } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.72, w: 10, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("DISEASE — MODALITY REFERENCE", {
x: 0.35, y: 0.1, w: 9, h: 0.55,
fontSize: 20, fontFace: "Georgia", bold: true, charSpacing: 2, color: C.white, margin: 0
});
const rows = [
// region, disease, first, second, note
["Shoulder", "Rotator Cuff Impingement", "X-Ray", "MRI", "Bony spurs, acromial shape"],
["Shoulder", "Full-Thickness Cuff Tear", "MRI", "X-Ray (screen)", "~100% accuracy on MRI"],
["Shoulder", "SLAP / Bankart Labral Tear", "MR Arthrography", "—", "Gold standard for labrum"],
["Shoulder", "AC Joint Injury", "X-Ray", "MRI", "MRI for soft-tissue grading"],
["Shoulder", "Complex # / Glenoid Rim", "X-Ray", "CT", "CT for surgical planning"],
["Elbow", "Radial Head / Elbow Fracture", "X-Ray", "CT", "CT for articular step-off"],
["Elbow", "OCD Capitellum", "MRI", "CT Arthrography", "Stability of fragment"],
["Elbow", "Tennis / Golfer's Elbow", "Ultrasound", "MRI", "US allows guided injection"],
["Elbow", "Loose Bodies / OA", "X-Ray", "CT Arthrography", "Radiolucent bodies visible"],
["Wrist", "Scaphoid Fracture (occult)", "X-Ray", "MRI", "MRI detects marrow oedema"],
["Wrist", "TFCC Tear", "MR Arthrography", "—", "Central vs peripheral tear"],
["Wrist", "Carpal Tunnel Syndrome", "Ultrasound", "MRI", "MRI if mass lesion suspected"],
["Wrist", "Rheumatoid Arthritis", "X-Ray (serial)", "MRI", "MRI for early synovitis"],
];
// Column headers
const colX = [0.2, 2.1, 4.0, 5.6, 7.2];
const colW = [1.85, 1.85, 1.55, 1.55, 2.7];
const headers = ["Region", "Disease", "1st Line", "2nd Line", "Key Note"];
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 0.85, w: 9.6, h: 0.34, fill: { color: C.teal }, line: { color: C.teal } });
headers.forEach((h, i) => {
s.addText(h, {
x: colX[i], y: 0.87, w: colW[i], h: 0.28,
fontSize: 9, fontFace: "Calibri", bold: true, color: C.white, margin: 0, charSpacing: 1
});
});
// Rows
const regionColors = { "Shoulder": "4A8FA8", "Elbow": "B89A6A", "Wrist": "7DA5A0" };
rows.forEach((row, i) => {
const y = 1.22 + i * 0.335;
const bg = i % 2 === 0 ? "FFFFFF" : "F5F0E8";
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 9.6, h: 0.32, fill: { color: bg }, line: { color: "E0D8CF", pt: 0.3 } });
row.forEach((cell, j) => {
let opts = {
x: colX[j], y: y + 0.03, w: colW[j], h: 0.26,
fontSize: j === 0 ? 8.5 : 9, fontFace: "Calibri",
color: j === 0 ? regionColors[cell] || C.text : j === 2 ? C.teal : C.text,
bold: j === 0 || j === 2, margin: 0, valign: "middle"
};
s.addText(cell, opts);
});
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — Key Principles (closing)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
// Decorative corner element
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.565, w: 10, h: 0.06, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("KEY PRINCIPLES", {
x: 0.5, y: 0.28, w: 9, h: 0.55,
fontSize: 28, fontFace: "Georgia", bold: true, charSpacing: 5,
color: C.white, align: "center", margin: 0
});
s.addText("Practical decision-making for upper limb imaging", {
x: 0.5, y: 0.84, w: 9, h: 0.32,
fontSize: 13, fontFace: "Palatino Linotype", italic: true,
color: C.sage, align: "center", margin: 0
});
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 1.22, w: 3, h: 0.025, fill: { color: C.gold }, line: { color: C.gold } });
const principles = [
{
icon: "①", color: C.teal,
title: "X-Ray is Always First",
body: "Never proceed to CT or MRI without prior radiographs. X-ray is fast, inexpensive, gives structural overview, detects bony abnormalities, and guides further imaging choice."
},
{
icon: "②", color: C.gold,
title: "CT for Bone; MRI for Soft Tissue",
body: "CT excels at fracture geometry, articular surface integrity, and surgical planning. MRI is the workhorse for tendons, ligaments, cartilage, labrum, nerves, and bone marrow oedema."
},
{
icon: "③", color: C.sage,
title: "Arthrography Unlocks Subtle Pathology",
body: "Intra-articular gadolinium (MR arthrography) or contrast (CT arthrography) drives fluid into partial tears, revealing SLAP lesions, Bankart tears, TFC defects, and scapholunate injuries that plain imaging misses."
},
{
icon: "④", color: "A0907A",
title: "US for Tendons and Guided Therapy",
body: "Ultrasound provides real-time dynamic assessment of tendons and allows simultaneous guided injection — an advantage neither MRI nor CT can match for de Quervain's, epicondylitis, or CTS."
},
];
principles.forEach((p, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 4.9;
const y = 1.42 + row * 1.9;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.55, h: 1.75,
fill: { color: "162535" }, line: { color: "2A3F52", pt: 0.5 },
shadow: { type: "outer", color: "000000", blur: 10, offset: 3, angle: 135, opacity: 0.2 }
});
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.05, h: 1.75, fill: { color: p.color }, line: { color: p.color } });
s.addText(p.icon, {
x: x + 0.15, y: y + 0.1, w: 0.4, h: 0.4,
fontSize: 18, fontFace: "Calibri", bold: true, color: p.color, margin: 0
});
s.addText(p.title, {
x: x + 0.55, y: y + 0.12, w: 3.85, h: 0.35,
fontSize: 12, fontFace: "Georgia", bold: true, color: C.white, margin: 0
});
s.addText(p.body, {
x: x + 0.15, y: y + 0.52, w: 4.25, h: 1.14,
fontSize: 9.5, fontFace: "Calibri", color: "8A9BB0", margin: 0
});
});
s.addText("Grainger & Allison's Diagnostic Radiology · Imaging Anatomy Vol. 3 (Bones, Joints, Vessels & Nerves)", {
x: 0.5, y: 5.38, w: 9, h: 0.2,
fontSize: 7.5, fontFace: "Calibri", italic: true, color: "3A5060", align: "center", margin: 0
});
}
// ─── Write file ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/upper-limb-radiology/Upper_Limb_Radiology.pptx" })
.then(() => console.log("✅ Presentation written successfully."))
.catch(err => { console.error("❌ Error:", err); process.exit(1); });
cd /home/daytona/workspace/upper-limb-radiology && node build.js 2>&1
ls -lh /home/daytona/workspace/upper-limb-radiology/Upper_Limb_Radiology.pptx
Upper Limb Radiology
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title - Dark slate background with teal/gold accents, Georgia serif font, region list panel |
| 2 | The Three Modalities - Three comparison cards (X-Ray, CT, MRI) with muted teal/gold palette |
| 3 | Shoulder: X-Ray - Two actual X-ray images (enthesophyte + rotator cuff arthropathy) with clinical notes |
| 4 | Shoulder: MRI - Full-thickness cuff tear MRI + SLAP MR arthrogram side by side |
| 5 | Shoulder: AC Joint + Decision Guide - MRI image with a complete modality selection reference panel |
| 6 | Elbow: CT - Large CT arthrogram image (OA + loose body) with annotated key points |
| 7 | Wrist: MRI - TFCC tear MR arthrogram with dark cinematic layout, clinical breakdown |
| 8 | Disease-Modality Reference Grid - All 13 conditions across Shoulder / Elbow / Wrist in a clean table |
| 9 | Key Principles - Four principle cards on dark background, closing slide |