MAKE PPT OF SPINE ANATOMY TEACHING FROM RADIOLOGY TEXTBOOK

Checking Date & Time
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Searching Images

spine anatomy radiology vertebral column regions

Reading File
Searching Images

vertebral body CT MRI anatomy pedicle lamina facet joint

Running Command

mkdir -p /home/daytona/workspace/spine-anatomy-ppt && ls /home/daytona/workspace/spine-anatomy-ppt/

Writing File

~/spine-anatomy-ppt/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Spine Anatomy – Radiological Teaching";
pres.author = "Radiology Teaching";

// ── PALETTE ──────────────────────────────────────────────────────────────────
const BG       = "0D1B2A";   // deep navy – dominant (60 %)
const PANEL    = "1A2E45";   // mid-navy panel
const ACCENT   = "00C2CB";   // teal accent
const ACCENT2  = "E8C84A";   // amber highlight
const TEXT_WH  = "FFFFFF";
const TEXT_LT  = "C8DCF0";
const TEXT_ACC = "00C2CB";
const GREY     = "4A6880";

// ── HELPERS ──────────────────────────────────────────────────────────────────
function addBg(slide) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: "100%",
    fill: { color: BG }, line: { color: BG }
  });
}

function slideTitle(slide, text, sub = "") {
  slide.addText(text, {
    x: 0.35, y: 0.18, w: 12.6, h: 0.55,
    fontSize: 26, bold: true, color: TEXT_WH, fontFace: "Calibri",
    charSpacing: 1
  });
  if (sub) {
    slide.addText(sub, {
      x: 0.35, y: 0.73, w: 12.6, h: 0.32,
      fontSize: 13, italic: true, color: ACCENT, fontFace: "Calibri"
    });
  }
  // accent bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 0.15, w: 0.07, h: 0.55,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
}

function panel(slide, x, y, w, h, color = PANEL) {
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h,
    fill: { color }, line: { color: ACCENT, transparency: 60 }, rectRadius: 0.06
  });
}

function bulletBox(slide, items, x, y, w, h, opts = {}) {
  const rows = items.map((item, i) => ({
    text: item,
    options: { bullet: true, breakLine: i < items.length - 1, fontSize: opts.fontSize || 13.5, color: opts.color || TEXT_LT, fontFace: "Calibri" }
  }));
  slide.addText(rows, { x, y, w, h, valign: "top", margin: 8 });
}

function label(slide, text, x, y, w, h, opts = {}) {
  slide.addText(text, {
    x, y, w, h,
    fontSize: opts.fontSize || 12, color: opts.color || TEXT_ACC,
    fontFace: "Calibri", bold: opts.bold || false,
    align: opts.align || "left", italic: opts.italic || false,
    valign: opts.valign || "middle"
  });
}

function fetchImages(urls) {
  try {
    const result = execSync(
      `node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
      { timeout: 60000 }
    ).toString();
    return JSON.parse(result);
  } catch (e) {
    console.error("Image fetch error:", e.message);
    return urls.map(() => ({ base64: null, error: e.message }));
  }
}

// ── FETCH ALL IMAGES ──────────────────────────────────────────────────────────
const imgUrls = [
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_23210f2872e8ac476534b362b587a1aad1c5f00d65dd836a78c1b89b858f7938.jpg",  // [0] vertebral column 3 views
  "https://cdn.orris.care/cdss_images/HARRISON_1763030928029_1575d48d-4f35-4bd0-9ab6-f32804998a9e.png",                           // [1] Harrison vertebral column
  "https://cdn.orris.care/cdss_images/475ea684fbb4e0e8121f1ffd62b2ca8145435ba7966370ec223366a2d7b88123.png",                       // [2] Bone marrow MRI (Fig 47.1)
  "https://cdn.orris.care/cdss_images/348b06d646c028e91b3814e44614849e06dada6d74f2dd37137b778920a7b82a.png",                       // [3] Plain film anatomy (Fig 47.2)
  "https://cdn.orris.care/cdss_images/00a4aead77ebf47b39c1aca28eb1ad8add183f18e57c7ed24c6c65336cccba8a.png",                       // [4] CT lumbar anatomy (Fig 47.3)
  "https://cdn.orris.care/cdss_images/961d0197c9a56527e1d71df11247d0c057f81de757ee0c91346b9f5df94100c4.png",                       // [5] Spinal ligaments MRI (Fig 47.5)
  "https://cdn.orris.care/cdss_images/d386cddbf2cfc5772e6cbe001a908f9e4125c944d6643c77f5a07037424dfd66.png",                       // [6] Ligamentum flavum (Fig 47.6)
  "https://cdn.orris.care/cdss_images/5d9baf1ced0754e8465fe3d578cfafc55d0b004013f57b8646b213bd2e3d900d.png",                       // [7] Cervical spine alignment (Fig 52.1)
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_f012224920ebf78e83464c17ad63ddea46dc84d65de5092b75ccc7e783162472.jpg",  // [8] CT facet angle + pedicle screws
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_383b0c8ab6906b6bec25243d7441aa81e7b9a6747afeaa8b422238afc803822a.jpg",  // [9] Axial MRI L4-L5 facet joints
];

console.log("Fetching images…");
const imgs = fetchImages(imgUrls);
console.log("Images fetched:", imgs.map((i, idx) => `[${idx}] ${i.error ? "ERR:"+i.error : "OK"}`).join(", "));

function img(slide, idx, x, y, w, h) {
  if (imgs[idx] && imgs[idx].base64 && !imgs[idx].error) {
    slide.addImage({ data: imgs[idx].base64, x, y, w, h });
  }
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);

  // Dark gradient panel left
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 8.5, h: 7.5,
    fill: { color: PANEL }, line: { color: PANEL }
  });

  s.addText("SPINE ANATOMY", {
    x: 0.5, y: 1.2, w: 7.5, h: 1.2,
    fontSize: 58, bold: true, color: TEXT_WH, fontFace: "Calibri",
    charSpacing: 4
  });
  s.addText("RADIOLOGICAL TEACHING", {
    x: 0.5, y: 2.4, w: 7.5, h: 0.6,
    fontSize: 24, bold: false, color: ACCENT, fontFace: "Calibri",
    charSpacing: 8
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.5, y: 3.1, w: 3.5, h: 0.06,
    fill: { color: ACCENT2 }, line: { color: ACCENT2 }
  });

  const tlBullets = [
    "Vertebral column overview & regional anatomy",
    "Bony architecture: body, neural arch, processes",
    "Joints: facet joints, intervertebral discs",
    "Ligaments of the spine",
    "Neural structures & vascular supply",
    "Craniocervical junction",
    "Imaging modalities & interpretation",
  ];
  s.addText(tlBullets.map((t, i) => ({
    text: t,
    options: { bullet: { type: "number" }, breakLine: i < tlBullets.length - 1, fontSize: 14, color: TEXT_LT, fontFace: "Calibri" }
  })), { x: 0.55, y: 3.4, w: 7.2, h: 3.2, valign: "top", margin: 6 });

  s.addText("Source: Grainger & Allison's Diagnostic Radiology", {
    x: 0.5, y: 6.9, w: 7.5, h: 0.3, fontSize: 11, italic: true, color: GREY, fontFace: "Calibri"
  });

  // Right column – spine diagram
  img(s, 0, 8.7, 0.3, 4.5, 6.9);
  s.addText("Vertebral column – AP, Lateral & Posterior views", {
    x: 8.7, y: 7.1, w: 4.5, h: 0.3, fontSize: 10, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 2 — VERTEBRAL COLUMN OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Vertebral Column Overview", "Regions, curvatures and clinical significance");

  // Regions table
  panel(s, 0.35, 1.1, 5.8, 5.8);

  const regionData = [
    ["Region", "Vertebrae", "Curvature", "Key Feature"],
    ["Cervical", "C1–C7", "Lordosis", "Most mobile; atlas & axis"],
    ["Thoracic", "T1–T12", "Kyphosis", "Rib articulations"],
    ["Lumbar", "L1–L5", "Lordosis", "Largest bodies; weight-bearing"],
    ["Sacrum", "S1–S5 (fused)", "Kyphosis", "Posterior pelvic wall"],
    ["Coccyx", "3–5 fused", "—", "Vestigial; coccygeal plexus"],
  ];
  s.addTable(regionData, {
    x: 0.5, y: 1.25, w: 5.5, h: 2.8,
    border: { pt: 0.5, color: ACCENT, transparency: 60 },
    fill: PANEL,
    color: TEXT_LT,
    fontSize: 12.5,
    fontFace: "Calibri",
    align: "left",
    rowH: 0.43,
    firstRow: true,
    firstRowFill: { color: ACCENT },
    firstRowColor: BG,
    firstRowFontBold: true,
  });

  s.addText("Key Clinical Points", { x: 0.5, y: 4.15, w: 5.5, h: 0.35, fontSize: 14, bold: true, color: ACCENT2, fontFace: "Calibri" });
  bulletBox(s, [
    "33 vertebrae total (7C + 12T + 5L + 5S + 4 coccygeal)",
    "S-shaped curvature essential for upright posture & shock absorption",
    "Cervical & thoracolumbar junctions are most vulnerable to injury",
    "Vertebrae increase in size inferiorly to accommodate greater loads",
  ], 0.5, 4.55, 5.5, 2.2, { fontSize: 13 });

  img(s, 1, 6.4, 1.0, 6.8, 6.3);
  s.addText("Anterior and lateral views — vertebral column (Harrison's)", {
    x: 6.4, y: 7.2, w: 6.8, h: 0.25, fontSize: 10, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 3 — VERTEBRAL BODY
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Vertebral Body", "Structure, bone marrow & radiological appearance");

  // Left content
  panel(s, 0.35, 1.1, 6.0, 6.1);
  label(s, "Bony Architecture", 0.5, 1.2, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Thin cortical rim + predominantly vertical trabecular framework",
    "Central framework stores phosphate & calcium and provides structural support",
    "Sclerotic bands at fusion sites (e.g. neurocentral junction, dens axis)",
    "Vascular channels visible on CT — can mimic fractures post-trauma",
    "Optimal evaluation: CT (cortex/trabecular) | MRI (marrow)",
  ], 0.5, 1.6, 5.7, 2.2, { fontSize: 13 });

  label(s, "Bone Marrow (MRI)", 0.5, 3.85, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Centre composed of red (haematopoietically active) marrow",
    "Normal adult distribution reached by age 25; yellow marrow increases with age",
    "Ricci patterns (T1-weighted MRI):",
    "  • Type 1: Uniform low signal + linear high signal around basivertebral vein (age ≤30)",
    "  • Type 2: Band-like high T1 periphery (age >40)",
    "  • Type 3: Multiple small indistinct high T1 foci throughout body",
    "  • Type 4: Multiple larger (5–15 mm) high T1 foci — advanced aging",
  ], 0.5, 4.25, 5.7, 2.8, { fontSize: 12 });

  img(s, 2, 6.6, 1.1, 6.6, 5.6);
  s.addText("Fig. 47.1 — Age-related bone marrow changes. Sagittal T1 MRI.\nA = 23 y (Type 1) | B = 44 y (Type 2) | C = 73 y (Type 4)\n(Grainger & Allison's Diagnostic Radiology)", {
    x: 6.6, y: 6.75, w: 6.6, h: 0.55, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 4 — NEURAL ARCH & PROCESSES
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Neural Arch & Posterior Elements", "Pedicles, laminae, spinous & transverse processes");

  // Two-column layout
  panel(s, 0.35, 1.1, 6.0, 6.1);
  label(s, "Neural Arch (Posterior Arch)", 0.5, 1.2, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Forms bony lateral and posterior border of spinal canal",
    "Lamina: between transverse process and spinous process",
    "Pedicle: between transverse process and vertebral body",
    "Pedicle notched superiorly & inferiorly → intervertebral foramen",
    "Spinal nerves exit through the intervertebral foramen",
  ], 0.5, 1.6, 5.7, 2.2, { fontSize: 13 });

  label(s, "Spinous & Transverse Processes", 0.5, 3.85, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Spinous process: most posterior part of neural arch",
    "Transverse processes: arise from lateral edge of neural arch",
    "Both serve as major attachments for deep back muscles",
    "Divide the neural arch into anatomical segments",
    "Plain film oblique view: 'Scottie dog' silhouette of neural arch",
  ], 0.5, 4.25, 5.7, 2.6, { fontSize: 13 });

  img(s, 3, 6.5, 1.1, 6.7, 5.6);
  s.addText("Fig. 47.2 — Normal spinal anatomy on plain film radiography.\nLateral (A), PA (B) and oblique (C) views.\nI=inf. articular process, L=lamina, O=foramen, P=pedicle, S=sup. articular process, Sp=spinous process, T=transverse process\n(Grainger & Allison's Diagnostic Radiology)", {
    x: 6.5, y: 6.7, w: 6.7, h: 0.65, fontSize: 9, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 5 — FACET JOINTS & INTERVERTEBRAL DISC
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Joints of the Spine", "Facet (zygapophyseal) joints & intervertebral discs");

  // Left panel – facet joints
  panel(s, 0.35, 1.1, 6.0, 2.9);
  label(s, "Facet Joints (Zygapophyseal Joints)", 0.5, 1.2, 5.7, 0.35, { fontSize: 13.5, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Diarthrodial synovial joints between inf. & sup. articular processes",
    "Articular processes arise from articular pillars (pedicle–lamina junction)",
    "Uncovertebral joints (Luschka) in cervical spine: limit lateral disc herniation",
    "Degenerative hypertrophy + ligamentum flavum thickening → spinal stenosis",
    "CT: measure facet angle (normally ~40–45° in lumbar spine)",
  ], 0.5, 1.58, 5.7, 2.3, { fontSize: 12.5 });

  // Left panel – IVD
  panel(s, 0.35, 4.1, 6.0, 3.1);
  label(s, "Intervertebral Disc (Symphysis)", 0.5, 4.2, 5.7, 0.35, { fontSize: 13.5, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Nucleus pulposus: water, proteoglycans, loose collagen; embryologically notochordal",
    "Annulus fibrosus: concentric fibrocartilage layers (Sharpey fibres at periphery)",
    "Annular fibres at 30° oblique angle → strong, flexible meshwork",
    "MRI: nucleus pulposus high T2 signal (water content); signal ↓ with degeneration",
    "Vacuum phenomenon (gas in disc space) = degenerative disc disease on CT/XR",
  ], 0.5, 4.58, 5.7, 2.5, { fontSize: 12.5 });

  img(s, 9, 6.5, 1.1, 6.7, 3.0);
  s.addText("Axial T2 MRI L4–L5 — vertebral body, spinal canal, lamina, facet joints and facet joint thickness measurement", {
    x: 6.5, y: 4.0, w: 6.7, h: 0.35, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });

  img(s, 4, 6.5, 4.2, 6.7, 3.0);
  s.addText("Fig. 47.3 — 3D CT L3: posterior (A), lateral (B), superior (C) views. *=spinal canal\n(Grainger & Allison's Diagnostic Radiology)", {
    x: 6.5, y: 7.1, w: 6.7, h: 0.3, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 6 — SPINAL LIGAMENTS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Spinal Ligaments", "Anterior column, posterior column & interconnecting ligaments");

  panel(s, 0.35, 1.1, 6.0, 6.1);

  const ligData = [
    ["Ligament", "Location & Function"],
    ["Anterior Longitudinal (ALL)", "Anterior vertebral bodies – entire spine; thick, limits extension"],
    ["Posterior Longitudinal (PLL)", "Vertebral canal, dens → sacrum; thicker in thoracic spine; limits flexion"],
    ["Ligamentum Flavum", "Paired; connects laminae; posterior wall of spinal canal; elastic – resists flexion"],
    ["Supraspinous", "Connects tips of spinous processes"],
    ["Interspinous", "Connects base of adjacent spinous processes"],
    ["Intertransverse", "Connects transverse processes"],
  ];
  s.addTable(ligData, {
    x: 0.5, y: 1.25, w: 5.5, h: 3.5,
    border: { pt: 0.5, color: ACCENT, transparency: 60 },
    fill: PANEL,
    color: TEXT_LT,
    fontSize: 12,
    fontFace: "Calibri",
    align: "left",
    rowH: 0.5,
    firstRow: true,
    firstRowFill: { color: ACCENT },
    firstRowColor: BG,
    firstRowFontBold: true,
    colW: [2.2, 3.3],
  });

  label(s, "Clinical Pearls", 0.5, 4.85, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "ALL thinner over vertebral bodies, wider over discs",
    "PLL separated from vertebral body by anterior epidural space (fat + veins)",
    "Ligamentum flavum visible on MRI (T1/T2) and CT — thickening → stenosis",
    "Ligamentum flavum forms lateral border of neuroforamina (fuses with facet capsule)",
  ], 0.5, 5.25, 5.7, 2.0, { fontSize: 12.5 });

  // Right – spinal ligaments MRI image
  img(s, 5, 6.5, 1.1, 6.7, 4.7);
  s.addText("Fig. 47.5 — Spinal ligaments on sagittal T1 MRI (lumbar).\n1=ALL, 2=PLL, 3=interspinous ligament, 4=supraspinous ligament\n(Grainger & Allison's Diagnostic Radiology)", {
    x: 6.5, y: 5.8, w: 6.7, h: 0.45, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });

  img(s, 6, 6.5, 6.3, 6.7, 1.0);
  s.addText("Fig. 47.6 — Ligamentum flavum on axial MRI (A,B) and CT (C,D)", {
    x: 6.5, y: 7.25, w: 6.7, h: 0.2, fontSize: 9, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 7 — NEURAL STRUCTURES & VASCULAR SUPPLY
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Neural Structures & Vascular Supply", "Spinal cord, nerve roots, conus medullaris & arteries");

  panel(s, 0.35, 1.1, 6.0, 3.0);
  label(s, "Spinal Canal & Neural Contents", 0.5, 1.2, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Spinal canal shape: oval (cervical/thoracic) → triangular (lower lumbar)",
    "Dura mater: anteriorly contacts PLL; laterally contacts medial pedicle borders",
    "Spinal cord: central butterfly grey matter on T2 MRI; wide normal variation in size",
    "Conus medullaris: terminal cord at L1–L2; tapers into cauda equina below",
    "Cervical/thoracic nerve roots exit horizontally; lumbar roots first descend in lateral recess",
  ], 0.5, 1.58, 5.7, 2.4, { fontSize: 12.5 });

  panel(s, 0.35, 4.2, 6.0, 3.0);
  label(s, "Vascular Supply", 0.5, 4.3, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "3 longitudinal arteries: 1 anterior spinal artery + 2 posterior spinal arteries",
    "Cervicothoracic region: segmental supply from vertebral arteries & great vessels",
    "Midthoracic region: watershed zone — collateral from superior/inferior arteries",
    "Thoracolumbar: segmental aortic/iliac arteries; artery of Adamkiewicz (T9–L2, usually left)",
    "Venous: Batson plexus — valveless, allows retrograde flow (tumour spread route)",
  ], 0.5, 4.68, 5.7, 2.4, { fontSize: 12.5 });

  img(s, 8, 6.5, 1.1, 6.7, 3.0);
  s.addText("CT: Quantitative lumbar spine anatomy — facet angle measurement (A) & sagittal view with pedicle screws (B)", {
    x: 6.5, y: 4.05, w: 6.7, h: 0.3, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });

  // info box
  panel(s, 6.5, 4.45, 6.7, 2.8, "163060");
  label(s, "⚡  Artery of Adamkiewicz", 6.65, 4.55, 6.4, 0.35, { fontSize: 13, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Largest radiculomedullary artery supplying thoracolumbar cord",
    "Origin: T9–L2 (most commonly left sided, ~75%)",
    "Critical landmark in aortic surgery — damage → anterior cord ischemia",
    "Best visualised on CT angiography or MR angiography",
  ], 6.65, 4.95, 6.3, 2.2, { fontSize: 12, color: TEXT_LT });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 8 — CRANIOCERVICAL JUNCTION
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Craniocervical Junction", "Occiput – C1 (Atlas) – C2 (Axis) anatomy & imaging");

  panel(s, 0.35, 1.1, 6.0, 6.1);

  label(s, "Bony Anatomy", 0.5, 1.2, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Atlas (C1): ring vertebra, no body or spinous process; anterior & posterior arches",
    "Axis (C2): odontoid process (dens) — projects superiorly through atlas ring",
    "Atlanto-occipital joint: condylar joint; allows flexion/extension & lateral tilt",
    "Atlanto-axial joint: pivot joint; 50% of cervical rotation occurs here",
    "Posterior elements C2: large spinous process; bifid in C3–C6",
  ], 0.5, 1.58, 5.7, 2.4, { fontSize: 12.5 });

  label(s, "Radiological Assessment", 0.5, 4.05, 5.7, 0.35, { fontSize: 14, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Anterior atlantodental interval (AADI): <3 mm adults, <5 mm children",
    "Clivus–odontoid line: clivus line should intersect tip of dens (cranio-cervical alignment)",
    "CT: preferred for bony injury; coronal/sagittal reformats essential",
    "MRI: ligamentous & neurological injury (apical/alar ligaments, cord signal)",
    "Biomechanics: most mobile → highest injury risk in polytrauma",
  ], 0.5, 4.43, 5.7, 2.6, { fontSize: 12.5 });

  img(s, 7, 6.5, 1.1, 6.7, 4.5);
  s.addText("Fig. 52.1 — Alignment on lateral cervical spine radiograph.\nNormal smooth contour of anterior spinal, posterior spinal, spinolaminar & facet joint lines.\n(Grainger & Allison's Diagnostic Radiology)", {
    x: 6.5, y: 5.55, w: 6.7, h: 0.4, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });

  // Key measurement summary
  panel(s, 6.5, 6.05, 6.7, 1.4, "163060");
  const measData = [
    ["Measurement", "Normal"],
    ["Anterior atlantodental interval", "≤3 mm (adults), ≤5 mm (children)"],
    ["Retropharyngeal space (C2)", "≤5 mm"],
    ["Retrotracheal space (C6)", "≤22 mm"],
  ];
  s.addTable(measData, {
    x: 6.5, y: 6.1, w: 6.7, h: 1.35,
    border: { pt: 0.5, color: ACCENT, transparency: 60 },
    fill: "163060",
    color: TEXT_LT,
    fontSize: 11,
    fontFace: "Calibri",
    rowH: 0.32,
    firstRow: true,
    firstRowFill: { color: ACCENT2 },
    firstRowColor: BG,
    firstRowFontBold: true,
    colW: [3.5, 3.2],
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 9 — IMAGING MODALITIES
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Imaging Modalities in Spine Radiology", "X-ray · CT · MRI — indications, strengths & interpretation");

  const mods = [
    {
      name: "Plain Radiography (X-ray)",
      color: "1A3550",
      accentC: ACCENT,
      points: [
        "First-line for bony alignment, fractures, degenerative change",
        "Views: AP, Lateral, Oblique ('Scottie dog' sign for spondylolysis)",
        "Lateral: assess 4 spinal lines (anterior, posterior, spinolaminar, facet)",
        "Limitation: poor soft tissue; overlapping structures; misses ~15% fractures",
        "Odontoid (open-mouth) view: C1–C2 alignment",
      ]
    },
    {
      name: "Computed Tomography (CT)",
      color: "1A3550",
      accentC: ACCENT2,
      points: [
        "Gold standard for bony injury, fracture classification, complex anatomy",
        "Multiplanar reformats (sagittal/coronal) replace plain films in polytrauma",
        "Excellent: cortical detail, facet joints, vertebral body fractures",
        "CT myelography: CSF space opacification if MRI contraindicated",
        "Vascular channels on CT may mimic fractures — compare with clinical context",
      ]
    },
    {
      name: "Magnetic Resonance Imaging (MRI)",
      color: "1A3550",
      accentC: "E05A8A",
      points: [
        "Gold standard for soft tissue, disc, cord, ligament, marrow assessment",
        "T1: marrow fat, anatomy; T2: disc water content, cord lesions, fluid",
        "STIR: marrow oedema (fracture, infection, neoplasm)",
        "Conus position (L1–L2), cauda equina, ligamentous integrity",
        "Indicated: neurological deficit, suspected ligamentous injury, post-trauma",
      ]
    },
  ];

  mods.forEach((mod, i) => {
    const x = 0.35 + i * 4.35;
    panel(s, x, 1.1, 4.15, 6.1, mod.color);
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.1, w: 4.15, h: 0.08,
      fill: { color: mod.accentC }, line: { color: mod.accentC }
    });
    label(s, mod.name, x + 0.12, 1.22, 3.9, 0.4, { fontSize: 13, bold: true, color: mod.accentC });
    bulletBox(s, mod.points, x + 0.12, 1.7, 3.9, 5.3, { fontSize: 12 });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  SLIDE 10 — DEGENERATIVE SPINE & SUMMARY
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBg(s);
  slideTitle(s, "Degenerative Changes & Teaching Summary", "Spondylosis, disc degeneration & key learning points");

  panel(s, 0.35, 1.1, 6.0, 3.1);
  label(s, "Degenerative Changes (OA of Spine)", 0.5, 1.2, 5.7, 0.35, { fontSize: 13.5, bold: true, color: ACCENT2 });
  bulletBox(s, [
    "Most common at cervical & lower lumbar spine",
    "Disc height loss + vacuum phenomenon (CT/XR) = degeneration",
    "Osteophytes arise anteriorly from vertebral bodies (plain film/CT)",
    "Sclerotic endplate changes; bridging osteophytes (DISH when ≥4 contiguous levels)",
    "Facet OA: osseous hypertrophy + ligamentum flavum thickening → spinal stenosis",
    "Spondylolisthesis: degenerative (posterior elements slip anteriorly with body) vs spondylolysis (pars defect)",
  ], 0.5, 1.58, 5.7, 2.5, { fontSize: 12 });

  panel(s, 0.35, 4.3, 6.0, 3.0);
  label(s, "Key Teaching Summary", 0.5, 4.4, 5.7, 0.35, { fontSize: 13.5, bold: true, color: ACCENT });
  const summary = [
    "7C + 12T + 5L + 5S + coccyx → 33 vertebrae; S-curve essential for posture",
    "Vertebral body: cortex + vertical trabeculae; marrow changes with age (Ricci types 1–4)",
    "Neural arch = pedicle + lamina; forms posterior spinal canal wall",
    "Facet joints: synovial; uncovertebral joints protect against lateral disc herniation",
    "IVD: nucleus pulposus (notochordal, water-rich) + annulus fibrosus (fibrocartilage, 30° oblique fibres)",
    "Key ligaments: ALL, PLL, ligamentum flavum (most radiologically significant)",
    "Conus medullaris normally at L1–L2; below → cauda equina",
    "Artery of Adamkiewicz: T9–L2 (left-sided); critical in aortic surgery",
  ];
  s.addText(summary.map((t, i) => ({
    text: t,
    options: { bullet: { type: "number" }, breakLine: i < summary.length - 1, fontSize: 12, color: TEXT_LT, fontFace: "Calibri" }
  })), { x: 0.5, y: 4.78, w: 5.7, h: 2.4, valign: "top", margin: 6 });

  img(s, 0, 6.5, 1.1, 6.7, 6.2);
  s.addText("Vertebral column — anterior, lateral, posterior views\n(Spine anatomy overview for reference)", {
    x: 6.5, y: 7.2, w: 6.7, h: 0.3, fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri", align: "center"
  });

  // Footer
  s.addText("Source: Grainger & Allison's Diagnostic Radiology | Grainger & Allison's 8e | Teaching edition 2026", {
    x: 0.35, y: 7.3, w: 13.0, h: 0.2, fontSize: 9.5, italic: true, color: GREY, fontFace: "Calibri"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
//  WRITE FILE
// ══════════════════════════════════════════════════════════════════════════════
const outPath = "/home/daytona/workspace/spine-anatomy-ppt/Spine_Anatomy_Radiology_Teaching.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
  console.log("✅ Written:", outPath);
}).catch(err => {
  console.error("❌ Error:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/spine-anatomy-ppt && node build.js 2>&1

Editing File

~/spine-anatomy-ppt/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/spine-anatomy-ppt/build.js'
Running Command

cd /home/daytona/workspace/spine-anatomy-ppt && node build.js 2>&1

Your presentation is ready:

Spine Anatomy Radiology Teaching

Presentation · PPTX


What's Inside (10 slides)

SlideTopic
1Title slide — contents overview, 3-view vertebral column diagram
2Vertebral Column Overview — regions table (C/T/L/S/Coccyx), curvatures, clinical key points
3Vertebral Body — cortex, trabeculae, Ricci bone marrow types (1–4) with MRI images
4Neural Arch & Posterior Elements — pedicle, lamina, spinous/transverse processes; plain film anatomy figures
5Joints of the Spine — facet (zygapophyseal) joints + intervertebral disc (nucleus pulposus/annulus fibrosus), MRI & CT images
6Spinal Ligaments — ALL, PLL, ligamentum flavum, inter/supraspinous; ligament MRI figure
7Neural Structures & Vascular Supply — spinal cord, conus medullaris (L1–L2), cauda equina; artery of Adamkiewicz highlighted
8Craniocervical Junction — Atlas (C1), Axis (C2), atlantodental interval measurements, cervical alignment lines
9Imaging Modalities — 3-column layout: X-ray vs CT vs MRI indications, strengths, interpretation tips
10Degenerative Changes & Teaching Summary — spondylosis, disc degeneration, numbered 8-point recap
Design: Dark navy background, teal accent, amber highlights — all radiological images embedded from Grainger & Allison's Diagnostic Radiology and peer-reviewed sources.
This is a shared conversation. Sign in to Orris to start your own chat.