Csvt ppt in 30 slides neuroradiology with mri images clean white slides

Reading File
Reading File
Searching the Web

CSVT cerebral sinus venous thrombosis MRI neuroradiology images findings 2024

Reading File
Finding Sources
Searching the Web

cerebral venous sinus thrombosis MRI T1 T2 DWI MRV axial images radiology

Reading File
Reading Web Page

https://radiologyassistant.nl/neuroradiology/sinus-thrombosi…

Running Command

mkdir -p /home/daytona/workspace/csvt-ppt && ls /home/daytona/workspace/csvt-ppt

Writing File

~/csvt-ppt/build_csvt.js

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

// ─── Fetch MRI images as base64 ─────────────────────────────────────────────
const imageUrls = [
  "https://radiologyassistant.nl/assets/cerebral-venous-thrombosis/a509797a5f0311_direct-thrombus-mr2.jpg",       // 0 T1 hypersignal SSS
  "https://radiologyassistant.nl/img/containers/main/cerebral-venous-thrombosis/a509797a615ba2_pseudodense-.jpg/65ff9ee1b4c8df725b142757139712c2.jpg", // 1 pseudodense
  "https://www.ajnr.org/content/ajnr/30/2/344/F3.large.jpg",   // 2 AJNR MRV
  "https://www.ajnr.org/content/ajnr/30/2/344/F1.large.jpg",   // 3 AJNR T1/T2
  "https://cdn.agilitycms.com/applied-radiology/publishhub/AR-D-24-0016/F002.jpeg",  // 4 applied radiology CSVT
  "https://www.mdpi.com/life/life-12-01215/article_deploy/html/images/life-12-01215-g001-550.jpg",  // 5 MDPI CSVT
  "https://media.springernature.com/m685/springer-static/image/art%3A10.1007%2Fs11547-016-0630-9/MediaObjects/11547_2016_630_Fig1_HTML.jpg", // 6 springer T1
  "https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41598-020-57867-1/MediaObjects/41598_2020_57867_Fig1_HTML.png", // 7 springer full
  "https://pubs.rsna.org/cms/10.1148/rg.26si055174/asset/images/g06oc03c01x.jpeg",  // 8 RSNA
];

let imgs = [];
try {
  const result = execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
    { maxBuffer: 50 * 1024 * 1024 }
  );
  imgs = JSON.parse(result.toString());
  console.log("Images fetched:", imgs.map((i, idx) => `[${idx}] ${i.error ? "ERR: "+i.error : "OK"}`).join(", "));
} catch (e) {
  console.error("Image fetch failed:", e.message);
  imgs = imageUrls.map(() => ({ base64: null, error: "fetch failed" }));
}

function getImg(idx) {
  return (imgs[idx] && !imgs[idx].error && imgs[idx].base64) ? imgs[idx].base64 : null;
}

// ─── Color Palette ─────────────────────────────────────────────────────────
const C = {
  white:     "FFFFFF",
  offwhite:  "F7F9FC",
  darknavy:  "0D1B2A",
  navy:      "1A3A5C",
  blue:      "1E6FBF",
  lightblue: "4A9FD5",
  accent:    "E63946",   // red accent for emphasis
  gray:      "5A6A7A",
  lightgray: "D8E3ED",
  midgray:   "8FA3B1",
};

// ─── Helper: slide header bar ───────────────────────────────────────────────
function addHeader(slide, title, subtitle) {
  // Navy top bar
  slide.addShape("rect", { x: 0, y: 0, w: 10, h: 0.55, fill: { color: C.navy }, line: { color: C.navy } });
  // Slide title in bar
  slide.addText(title.toUpperCase(), {
    x: 0.18, y: 0, w: 9.5, h: 0.55,
    fontSize: 13, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", charSpacing: 1.2, margin: 0
  });
  // Accent left strip
  slide.addShape("rect", { x: 0, y: 0, w: 0.06, h: 0.55, fill: { color: C.accent }, line: { color: C.accent } });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.18, y: 0.62, w: 9.5, h: 0.3,
      fontSize: 9.5, italic: true, color: C.lightblue,
      fontFace: "Calibri", margin: 0
    });
  }
}

// ─── Helper: footer ──────────────────────────────────────────────────────────
function addFooter(slide, num) {
  slide.addShape("rect", { x: 0, y: 5.38, w: 10, h: 0.245, fill: { color: C.lightgray }, line: { color: C.lightgray } });
  slide.addText("CSVT — Neuroradiology | Cerebral Sinus Venous Thrombosis", {
    x: 0.18, y: 5.38, w: 8.5, h: 0.245,
    fontSize: 7.5, color: C.gray, fontFace: "Calibri", valign: "middle", margin: 0
  });
  slide.addText(`${num} / 30`, {
    x: 9, y: 5.38, w: 0.8, h: 0.245,
    fontSize: 7.5, color: C.gray, fontFace: "Calibri", align: "right", valign: "middle", margin: 0
  });
}

// ─── Helper: section divider slide ──────────────────────────────────────────
function addSectionSlide(pres, num, section, subtitle, color) {
  const s = pres.addSlide();
  s.background = { color: color || C.navy };
  s.addShape("rect", { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.accent }, line: { color: C.accent } });
  s.addText(section, {
    x: 0.5, y: 1.7, w: 9, h: 1.4,
    fontSize: 36, bold: true, color: C.white,
    fontFace: "Calibri", align: "left"
  });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.5, y: 3.2, w: 9, h: 0.8,
      fontSize: 16, color: C.lightblue,
      fontFace: "Calibri", align: "left", italic: true
    });
  }
  s.addText(`${num} / 30`, {
    x: 9, y: 5.2, w: 0.8, h: 0.3,
    fontSize: 8, color: C.midgray, fontFace: "Calibri", align: "right"
  });
  return s;
}

// ─── Helper: two-column text+image ──────────────────────────────────────────
function addTwoCol(slide, bullets, imgBase64, imgCaption, yStart) {
  const y = yStart || 0.95;
  const textH = 4.0;
  slide.addText(bullets, {
    x: 0.22, y: y, w: 4.9, h: textH,
    fontSize: 11, color: C.darknavy,
    fontFace: "Calibri", valign: "top"
  });
  if (imgBase64) {
    slide.addImage({ data: imgBase64, x: 5.3, y: y, w: 4.4, h: 3.4 });
    if (imgCaption) {
      slide.addText(imgCaption, {
        x: 5.3, y: y + 3.42, w: 4.4, h: 0.4,
        fontSize: 7.5, color: C.gray, italic: true, fontFace: "Calibri", align: "center", margin: 0
      });
    }
  }
}

// ─── Helper: full-image slide ────────────────────────────────────────────────
function addImageSlide(slide, imgBase64, caption, yStart) {
  const y = yStart || 0.95;
  if (imgBase64) {
    slide.addImage({ data: imgBase64, x: 0.5, y: y, w: 9, h: 3.8 });
  } else {
    slide.addShape("rect", { x: 0.5, y: y, w: 9, h: 3.8, fill: { color: C.lightgray }, line: { color: C.midgray } });
    slide.addText("[MRI image — see radiology reference]", {
      x: 0.5, y: y + 1.5, w: 9, h: 0.8,
      fontSize: 12, color: C.midgray, fontFace: "Calibri", align: "center"
    });
  }
  if (caption) {
    slide.addText(caption, {
      x: 0.5, y: y + 3.85, w: 9, h: 0.45,
      fontSize: 9, color: C.gray, italic: true, fontFace: "Calibri", align: "center", margin: 0
    });
  }
}

// ─── Helper: bullet list ─────────────────────────────────────────────────────
function makeBullets(items, bold, fontSize) {
  return items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", code: "2022" },
      fontSize: fontSize || 11,
      bold: bold || false,
      color: C.darknavy,
      breakLine: i < items.length - 1
    }
  }));
}

// ─── Helper: table ───────────────────────────────────────────────────────────
function addStyledTable(slide, rows, colW, y) {
  slide.addTable(rows, {
    x: 0.22, y: y || 1.0, w: 9.55,
    colW: colW,
    fontSize: 10, fontFace: "Calibri",
    border: { pt: 0.5, color: C.lightgray },
    autoPage: false
  });
}

// ════════════════════════════════════════════════════════════════════════════
// BUILD PRESENTATION
// ════════════════════════════════════════════════════════════════════════════
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "CSVT - Cerebral Sinus Venous Thrombosis: A Neuroradiology Approach";
pres.subject = "Neuroradiology";
pres.author = "Neuroradiology Department";

// ══════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  // Full-width top strip
  s.addShape("rect", { x: 0, y: 0, w: 10, h: 1.5, fill: { color: C.darknavy }, line: { color: C.darknavy } });
  s.addShape("rect", { x: 0, y: 0, w: 0.18, h: 1.5, fill: { color: C.accent }, line: { color: C.accent } });
  // Bottom strip
  s.addShape("rect", { x: 0, y: 5.1, w: 10, h: 0.525, fill: { color: C.lightgray }, line: { color: C.lightgray } });
  // Acronym
  s.addText("CSVT", {
    x: 0.35, y: 0.1, w: 9, h: 1.0,
    fontSize: 54, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", charSpacing: 5
  });
  // Full title
  s.addText("Cerebral Sinus Venous Thrombosis", {
    x: 0.35, y: 1.55, w: 9.3, h: 0.75,
    fontSize: 24, bold: true, color: C.navy,
    fontFace: "Calibri"
  });
  s.addText("A Comprehensive Neuroradiology Approach", {
    x: 0.35, y: 2.3, w: 9, h: 0.45,
    fontSize: 16, color: C.blue, fontFace: "Calibri", italic: true
  });
  // Decorative line
  s.addShape("rect", { x: 0.35, y: 2.85, w: 5.5, h: 0.04, fill: { color: C.lightblue }, line: { color: C.lightblue } });
  // Topics overview
  s.addText([
    { text: "MRI Protocols  •  Direct & Indirect Signs  •  Thrombus Evolution  •  Differential Diagnosis  •  Management", options: { fontSize: 10, color: C.gray, fontFace: "Calibri" } }
  ], { x: 0.35, y: 2.95, w: 9, h: 0.4 });
  // Dept
  s.addText("Neuroradiology Department  |  June 2026", {
    x: 0.35, y: 5.1, w: 9, h: 0.525,
    fontSize: 9, color: C.gray, fontFace: "Calibri", valign: "middle"
  });
}

// ══════════════════════════════════════════════════
// SLIDE 2 — AGENDA / OUTLINE
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Presentation Outline");
  addFooter(s, 2);

  const sections = [
    ["01", "Introduction & Epidemiology", "Definition, incidence, demographics"],
    ["02", "Anatomy of Cerebral Venous System", "Dural sinuses, cortical veins, deep veins"],
    ["03", "Pathophysiology", "Virchow's triad, thrombosis mechanism"],
    ["04", "Clinical Presentation", "Signs, symptoms, risk factors"],
    ["05", "Imaging Protocols", "MRI sequences, CT venography"],
    ["06", "Direct MRI Signs", "T1, T2, DWI, SWI, FLAIR findings"],
    ["07", "Indirect MRI Signs", "Edema, hemorrhage, venous infarct"],
    ["08", "MR Venography", "TOF, PC, CE-MRV techniques"],
    ["09", "Site-specific Findings", "SSS, transverse, sigmoid, cavernous sinus"],
    ["10", "Differential Diagnosis & Pitfalls", "Mimics and false positives"],
    ["11", "Management & Treatment", "Anticoagulation, endovascular, monitoring"],
    ["12", "Prognosis & Follow-up", "Outcomes, recanalization, recurrence"],
  ];

  const leftY = 1.05;
  const rowH = 0.3;
  sections.slice(0, 6).forEach((r, i) => {
    s.addShape("rect", { x: 0.22, y: leftY + i * rowH, w: 0.35, h: 0.24, fill: { color: C.blue }, line: { color: C.blue }, rounding: true });
    s.addText(r[0], { x: 0.22, y: leftY + i * rowH, w: 0.35, h: 0.24, fontSize: 8.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(`${r[1]}  `, { x: 0.65, y: leftY + i * rowH, w: 4.3, h: 0.24, fontSize: 10, bold: true, color: C.darknavy, fontFace: "Calibri", valign: "middle", margin: 0 });
    s.addText(r[2], { x: 0.65, y: leftY + i * rowH + 0.13, w: 4.3, h: 0.18, fontSize: 8, color: C.midgray, fontFace: "Calibri", italic: true, valign: "top", margin: 0 });
  });
  sections.slice(6).forEach((r, i) => {
    s.addShape("rect", { x: 5.22, y: leftY + i * rowH, w: 0.35, h: 0.24, fill: { color: C.lightblue }, line: { color: C.lightblue }, rounding: true });
    s.addText(r[0], { x: 5.22, y: leftY + i * rowH, w: 0.35, h: 0.24, fontSize: 8.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(`${r[1]}  `, { x: 5.65, y: leftY + i * rowH, w: 4.1, h: 0.24, fontSize: 10, bold: true, color: C.darknavy, fontFace: "Calibri", valign: "middle", margin: 0 });
    s.addText(r[2], { x: 5.65, y: leftY + i * rowH + 0.13, w: 4.1, h: 0.18, fontSize: 8, color: C.midgray, fontFace: "Calibri", italic: true, valign: "top", margin: 0 });
  });
}

// ══════════════════════════════════════════════════
// SLIDE 3 — SECTION DIVIDER: INTRODUCTION
// ══════════════════════════════════════════════════
addSectionSlide(pres, 3, "Introduction & Epidemiology", "Understanding the scope of CSVT", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 4 — DEFINITION & EPIDEMIOLOGY
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Definition & Epidemiology");
  addFooter(s, 4);

  s.addText("What is CSVT?", { x: 0.22, y: 0.65, w: 9.5, h: 0.3, fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Cerebral Sinus Venous Thrombosis (CSVT) — thrombotic occlusion of the dural venous sinuses and/or cerebral veins",
    "Accounts for 0.5–1% of all strokes; incidence ~5 per million per year",
    "More common in women (75%) due to pregnancy, puerperium, oral contraceptives",
    "Bimodal age distribution: neonates and young adults (20–35 years)",
    "Mortality has declined to <5% with modern anticoagulation therapy",
    "Highly treatable if recognized early — imaging is key to diagnosis",
  ]), { x: 0.22, y: 1.0, w: 9.55, h: 3.2, fontFace: "Calibri" });

  // Stats boxes
  const stats = [
    ["5/million/yr", "Incidence"],
    ["75%", "Female predominance"],
    ["<5%", "Modern mortality"],
    ["80%", "Good outcome with Rx"],
  ];
  stats.forEach((st, i) => {
    const xPos = 0.22 + i * 2.4;
    s.addShape("rect", { x: xPos, y: 4.35, w: 2.2, h: 0.7, fill: { color: C.offwhite }, line: { color: C.lightblue, pt: 1.5 } });
    s.addText(st[0], { x: xPos, y: 4.38, w: 2.2, h: 0.36, fontSize: 16, bold: true, color: C.blue, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(st[1], { x: xPos, y: 4.74, w: 2.2, h: 0.25, fontSize: 8, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  });
}

// ══════════════════════════════════════════════════
// SLIDE 5 — ANATOMY OF CEREBRAL VENOUS SYSTEM
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Anatomy: Cerebral Venous System", "Dural sinuses, cortical & deep veins");
  addFooter(s, 5);

  s.addText("Dural Venous Sinuses", { x: 0.22, y: 0.65, w: 4.8, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Superior sagittal sinus (SSS) — most common CSVT site",
    "Inferior sagittal sinus",
    "Transverse sinuses (bilateral)",
    "Sigmoid sinuses",
    "Straight sinus — receives deep venous drainage",
    "Cavernous sinuses — anterior skull base",
    "Torcular Herophili — confluence of sinuses",
  ]), { x: 0.22, y: 1.0, w: 4.8, h: 2.8, fontFace: "Calibri" });

  s.addText("Cerebral Veins", { x: 0.22, y: 3.9, w: 4.8, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Superficial cortical veins — drain into SSS",
    "Vein of Labbe — temporal lobe drainage",
    "Vein of Trolard — large anastomotic vein",
    "Deep veins: internal cerebral veins, vein of Galen, basal vein of Rosenthal",
  ]), { x: 0.22, y: 4.25, w: 4.8, h: 1.0, fontFace: "Calibri" });

  // Anatomy placeholder / decorative
  s.addShape("rect", { x: 5.3, y: 0.95, w: 4.4, h: 4.0, fill: { color: C.offwhite }, line: { color: C.lightgray, pt: 1 } });
  s.addText("Cerebral Venous Anatomy", { x: 5.3, y: 1.8, w: 4.4, h: 0.4, fontSize: 12, bold: true, color: C.midgray, fontFace: "Calibri", align: "center" });
  s.addText([
    { text: "SSS", options: { fontSize: 10, bold: true, color: C.accent } }, { text: " → Torcular → Transverse → Sigmoid → IJV\n", options: { fontSize: 10, color: C.darknavy } },
    { text: "Straight Sinus", options: { fontSize: 10, bold: true, color: C.blue } }, { text: " → Torcular\n", options: { fontSize: 10, color: C.darknavy } },
    { text: "Deep veins", options: { fontSize: 10, bold: true, color: C.lightblue } }, { text: " → Vein of Galen → Straight Sinus\n", options: { fontSize: 10, color: C.darknavy } },
    { text: "Cortical veins", options: { fontSize: 10, bold: true, color: C.gray } }, { text: " → SSS or transverse sinuses", options: { fontSize: 10, color: C.darknavy } },
  ], { x: 5.4, y: 2.3, w: 4.2, h: 1.8, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════
// SLIDE 6 — PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Pathophysiology", "Virchow's Triad applied to CSVT");
  addFooter(s, 6);

  // Three boxes for Virchow's triad
  const triad = [
    { label: "Hypercoagulability", color: C.blue, items: ["Thrombophilia (Factor V Leiden, protein C/S deficiency)", "Pregnancy & puerperium", "Oral contraceptives", "Malignancy", "Antiphospholipid syndrome"] },
    { label: "Stasis", color: C.lightblue, items: ["Dehydration", "Cardiac failure", "Dural AVM", "Obesity (increased venous pressure)", "Immobility"] },
    { label: "Endothelial Injury", color: C.accent, items: ["Trauma / neurosurgery", "Lumbar puncture", "Infection (meningitis, sinusitis, mastoiditis)", "Inflammatory disease (Behcet's, IBD)", "Dural sinus invasion by tumor"] },
  ];
  triad.forEach((t, i) => {
    const xPos = 0.22 + i * 3.25;
    s.addShape("rect", { x: xPos, y: 0.7, w: 3.0, h: 0.42, fill: { color: t.color }, line: { color: t.color } });
    s.addText(t.label, { x: xPos, y: 0.7, w: 3.0, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    const bullets = t.items.map((item, ii) => ({ text: item, options: { bullet: { type: "bullet" }, fontSize: 10, color: C.darknavy, breakLine: ii < t.items.length - 1 } }));
    s.addText(bullets, { x: xPos, y: 1.15, w: 3.0, h: 2.8, fontFace: "Calibri", valign: "top" });
  });

  // Consequence
  s.addShape("rect", { x: 0.22, y: 4.1, w: 9.55, h: 0.04, fill: { color: C.lightgray }, line: { color: C.lightgray } });
  s.addText("Consequence:", { x: 0.22, y: 4.22, w: 1.4, h: 0.3, fontSize: 10, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText("Thrombus → venous outflow obstruction → raised venous pressure → vasogenic edema → cytotoxic edema → hemorrhagic venous infarction", {
    x: 1.65, y: 4.22, w: 8.1, h: 0.55, fontSize: 10, color: C.darknavy, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════
// SLIDE 7 — CLINICAL PRESENTATION
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Clinical Presentation");
  addFooter(s, 7);

  s.addText("Symptoms", { x: 0.22, y: 0.65, w: 4.5, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Headache — most common (90%); progressive, often bilateral",
    "Focal neurological deficits — weakness, sensory loss, aphasia",
    "Seizures — focal or generalized (30–40%)",
    "Papilledema — raised intracranial pressure",
    "Visual disturbances — diplopia, blurred vision",
    "Altered consciousness — encephalopathy",
    "Cavernous sinus triad: proptosis, chemosis, ophthalmoplegia",
  ]), { x: 0.22, y: 1.0, w: 4.7, h: 3.0, fontFace: "Calibri" });

  s.addText("Risk Factors", { x: 5.1, y: 0.65, w: 4.5, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  const rfTable = [
    [{ text: "Prothrombotic Conditions", options: { bold: true, color: C.white, fill: C.blue } }, { text: "Situational", options: { bold: true, color: C.white, fill: C.blue } }],
    [{ text: "Factor V Leiden", options: { color: C.darknavy } }, { text: "OCP use", options: { color: C.darknavy } }],
    [{ text: "Prothrombin mutation", options: { color: C.darknavy } }, { text: "Pregnancy/puerperium", options: { color: C.darknavy } }],
    [{ text: "Protein C/S deficiency", options: { color: C.darknavy } }, { text: "Dehydration", options: { color: C.darknavy } }],
    [{ text: "Antiphospholipid Ab", options: { color: C.darknavy } }, { text: "Trauma/surgery", options: { color: C.darknavy } }],
    [{ text: "Homocysteinemia", options: { color: C.darknavy } }, { text: "Infection/inflammation", options: { color: C.darknavy } }],
    [{ text: "Malignancy", options: { color: C.darknavy } }, { text: "Drugs (steroids, androgens)", options: { color: C.darknavy } }],
  ];
  s.addTable(rfTable, { x: 5.1, y: 1.0, w: 4.7, colW: [2.35, 2.35], fontSize: 10, fontFace: "Calibri", border: { pt: 0.5, color: C.lightgray } });

  s.addText("Subacute onset in 50% of cases. Symptom duration ranges from hours to weeks. High clinical suspicion required — mimics many conditions.", {
    x: 0.22, y: 4.15, w: 9.55, h: 0.55, fontSize: 9.5, italic: true, color: C.gray, fontFace: "Calibri"
  });
}

// ══════════════════════════════════════════════════
// SLIDE 8 — SECTION DIVIDER: IMAGING
// ══════════════════════════════════════════════════
addSectionSlide(pres, 8, "Imaging Protocols", "CT, MRI, and Venography", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 9 — IMAGING PROTOCOLS OVERVIEW
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Imaging Protocols", "Which modality and when?");
  addFooter(s, 9);

  const protocolRows = [
    [{ text: "Modality", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Indication", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Key Sequences / Findings", options: { bold: true, color: C.white, fill: C.navy } }],
    [{ text: "NECT (Non-contrast CT)", options: { color: C.darknavy } }, { text: "Initial screening; rapid triage", options: { color: C.darknavy } }, { text: "Dense sinus sign, cord sign, empty delta sign", options: { color: C.darknavy } }],
    [{ text: "CT Venography (CTV)", options: { color: C.darknavy } }, { text: "Rapid, widely available, good for sinuses", options: { color: C.darknavy } }, { text: "Filling defect in venous sinus", options: { color: C.darknavy } }],
    [{ text: "MRI Brain", options: { bold: true, color: C.blue } }, { text: "Gold standard; superior for parenchyma", options: { color: C.darknavy } }, { text: "T1, T2, FLAIR, DWI, SWI/GRE sequences", options: { bold: true, color: C.blue } }],
    [{ text: "MR Venography (MRV)", options: { bold: true, color: C.blue } }, { text: "Combined with MRI — gold standard pair", options: { color: C.darknavy } }, { text: "TOF, PC, or CE-MRV; absent flow in sinus", options: { bold: true, color: C.blue } }],
    [{ text: "DSA (Conventional Angio)", options: { color: C.darknavy } }, { text: "Reserved for equivocal cases / intervention", options: { color: C.darknavy } }, { text: "Direct visualization, pressure gradients", options: { color: C.darknavy } }],
  ];
  s.addTable(protocolRows, {
    x: 0.22, y: 0.7, w: 9.55,
    colW: [2.4, 2.9, 4.25],
    fontSize: 10, fontFace: "Calibri",
    border: { pt: 0.5, color: C.lightgray },
    rowH: 0.38
  });

  s.addText("MRI Protocol Recommendation:", { x: 0.22, y: 4.25, w: 2.6, h: 0.3, fontSize: 10, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText("T1W + T2W + FLAIR + DWI + SWI/GRE + MRV (TOF or CE). Post-gadolinium T1 adds value for equivocal cases and cortical vein thrombosis.", {
    x: 2.85, y: 4.25, w: 7.0, h: 0.45, fontSize: 9.5, color: C.darknavy, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════
// SLIDE 10 — SECTION DIVIDER: DIRECT MRI SIGNS
// ══════════════════════════════════════════════════
addSectionSlide(pres, 10, "Direct MRI Signs", "Signal changes within the thrombus", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 11 — THROMBUS EVOLUTION ON MRI
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Thrombus Signal Evolution on MRI", "Stage-dependent appearance");
  addFooter(s, 11);

  const thrombus = [
    [{ text: "Stage", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Time", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Hgb Form", options: { bold: true, color: C.white, fill: C.navy } }, { text: "T1W", options: { bold: true, color: C.white, fill: C.navy } }, { text: "T2W", options: { bold: true, color: C.white, fill: C.navy } }, { text: "SWI/GRE", options: { bold: true, color: C.white, fill: C.navy } }],
    [{ text: "Hyperacute", options: { color: C.darknavy } }, { text: "<24 hrs", options: { color: C.darknavy } }, { text: "Oxyhemoglobin", options: { color: C.darknavy } }, { text: "Iso", options: { color: C.darknavy } }, { text: "Hyperintense", options: { color: C.darknavy } }, { text: "Hypointense (↓)", options: { color: C.darknavy } }],
    [{ text: "Acute", options: { bold: true, color: C.accent } }, { text: "1–7 days", options: { bold: true, color: C.accent } }, { text: "Deoxyhemoglobin", options: { color: C.darknavy } }, { text: "Iso (difficult)", options: { color: C.darknavy } }, { text: "Hypointense (↓)", options: { bold: true, color: C.accent } }, { text: "Hypointense ↓↓ (blooming)", options: { bold: true, color: C.accent } }],
    [{ text: "Subacute", options: { bold: true, color: C.blue } }, { text: "1–2 weeks", options: { bold: true, color: C.blue } }, { text: "Methemoglobin", options: { color: C.darknavy } }, { text: "Hyperintense ↑↑", options: { bold: true, color: C.blue } }, { text: "Hyperintense ↑", options: { color: C.darknavy } }, { text: "Iso to hypointense", options: { color: C.darknavy } }],
    [{ text: "Chronic", options: { color: C.darknavy } }, { text: ">2 weeks", options: { color: C.darknavy } }, { text: "Hemosiderin", options: { color: C.darknavy } }, { text: "Variable/low", options: { color: C.darknavy } }, { text: "Hypointense", options: { color: C.darknavy } }, { text: "Hypointense ↓↓", options: { color: C.darknavy } }],
    [{ text: "Recanalized", options: { color: C.gray } }, { text: "Weeks–months", options: { color: C.gray } }, { text: "—", options: { color: C.gray } }, { text: "Flow void returns", options: { color: C.gray } }, { text: "Flow void returns", options: { color: C.gray } }, { text: "Variable", options: { color: C.gray } }],
  ];
  s.addTable(thrombus, {
    x: 0.22, y: 0.7, w: 9.55,
    colW: [1.4, 1.35, 1.75, 1.45, 1.7, 1.9],
    fontSize: 9.5, fontFace: "Calibri",
    border: { pt: 0.5, color: C.lightgray },
    rowH: 0.4
  });

  s.addText("Clinical Pearl: Acute CSVT may be the most difficult to detect on standard MRI sequences due to isointense T1 signal. SWI/GRE blooming effect is the most sensitive sequence in the acute phase.", {
    x: 0.22, y: 4.0, w: 9.55, h: 0.6, fontSize: 9.5, italic: true, color: C.gray, fontFace: "Calibri"
  });
}

// ══════════════════════════════════════════════════
// SLIDE 12 — T1 SIGNAL: HYPERSIGNAL IN SSS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "T1-Weighted Imaging: Direct Thrombus Sign", "T1 hypersignal in subacute thrombus");
  addFooter(s, 12);

  s.addText(makeBullets([
    "Normal dural sinuses show low signal (flow void) on T1W images",
    "Subacute thrombus (methemoglobin phase, days 7–14): T1 HYPERINTENSE signal replacing flow void",
    "Sagittal T1 is the best plane for evaluating the SSS and straight sinus",
    "Sensitivity of T1 hyperintensity: ~71% for DVST",
    "Can be confused with: slow flow (especially on 3T), fat saturation artifacts",
    "Always correlate with MRV for confirmation",
  ]), { x: 0.22, y: 0.72, w: 4.8, h: 3.4, fontFace: "Calibri" });

  const img0 = getImg(0);
  if (img0) {
    s.addImage({ data: img0, x: 5.3, y: 0.72, w: 4.4, h: 3.5 });
    s.addText("T1W sagittal: hyperintense thrombus in superior sagittal sinus (subacute phase)", {
      x: 5.3, y: 4.25, w: 4.4, h: 0.45, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0
    });
  } else {
    s.addShape("rect", { x: 5.3, y: 0.72, w: 4.4, h: 3.5, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("T1W: Hyperintense signal in thrombosed sinus\n(subacute methemoglobin phase)", {
      x: 5.3, y: 1.8, w: 4.4, h: 1.0, fontSize: 11, color: C.midgray, fontFace: "Calibri", align: "center" });
  }

  s.addShape("rect", { x: 0.22, y: 4.25, w: 4.8, h: 0.6, fill: { color: C.offwhite }, line: { color: C.lightblue, pt: 1 } });
  s.addText("Key Finding: T1 hypersignal in a venous sinus = strong evidence of subacute CSVT. Combined T1+T2 abnormality increases specificity.", {
    x: 0.28, y: 4.28, w: 4.68, h: 0.54, fontSize: 9, color: C.navy, fontFace: "Calibri", margin: 0 });
}

// ══════════════════════════════════════════════════
// SLIDE 13 — T2/FLAIR SIGNS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "T2W & FLAIR: Flow Void Loss and Edema", "Direct and indirect parenchymal changes");
  addFooter(s, 13);

  s.addText("T2W Direct Signs:", { x: 0.22, y: 0.65, w: 9.5, h: 0.28, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Loss of normal T2 FLOW VOID in the affected sinus — the earliest and most reliable sign",
    "Acute phase (deoxyhemoglobin): T2 HYPOINTENSE signal within the sinus",
    "Subacute phase: T2 hyperintense thrombus (methemoglobin)",
    "Asymmetric sinus signals should always raise suspicion",
  ]), { x: 0.22, y: 0.95, w: 4.8, h: 1.6, fontFace: "Calibri" });

  s.addText("FLAIR Sequence:", { x: 0.22, y: 2.65, w: 9.5, h: 0.28, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "FLAIR: Hyperintense signal in the thrombosed sinus (sensitivity ~50–60%)",
    "CSF suppression makes FLAIR excellent for cortical vein thrombosis detection",
    "FLAIR may show parenchymal edema before DWI changes",
    "Sulcal FLAIR hyperintensity suggests cortical vein thrombosis",
  ]), { x: 0.22, y: 2.95, w: 4.8, h: 1.6, fontFace: "Calibri" });

  const img3 = getImg(3);
  if (img3) {
    s.addImage({ data: img3, x: 5.3, y: 0.72, w: 4.4, h: 3.5 });
    s.addText("T1/T2 showing thrombus signal changes in SSS (AJNR)", {
      x: 5.3, y: 4.25, w: 4.4, h: 0.38, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 5.3, y: 0.72, w: 4.4, h: 3.5, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("T2/FLAIR: Loss of flow void, parenchymal edema", {
      x: 5.3, y: 2.1, w: 4.4, h: 0.8, fontSize: 11, color: C.midgray, fontFace: "Calibri", align: "center" });
  }
}

// ══════════════════════════════════════════════════
// SLIDE 14 — DWI / ADC
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Diffusion-Weighted Imaging (DWI/ADC)", "Distinguishing vasogenic from cytotoxic edema");
  addFooter(s, 14);

  s.addText(makeBullets([
    "DWI in CSVT — two distinct patterns:",
    "  (1) Thrombus itself: DWI hyperintense, ADC variable/restricted (especially subacute)",
    "  (2) Parenchymal changes: vasogenic vs cytotoxic edema",
    "",
    "Vasogenic edema: DWI mildly ↑, ADC ↑ (reversible if treated early)",
    "Cytotoxic edema: DWI ↑↑, ADC ↓ (true infarction — irreversible)",
    "Mixed patterns common in hemorrhagic venous infarction",
    "ADC normalization on follow-up = favorable prognostic sign",
    "DWI-based diagnosis: sensitivity ~50–70%, specificity >90% for thrombus",
    "DWI combined with T1+T2 improves overall CSVT detection",
  ]), { x: 0.22, y: 0.72, w: 9.55, h: 3.6, fontFace: "Calibri" });

  // Summary box
  s.addShape("rect", { x: 0.22, y: 4.3, w: 9.55, h: 0.55, fill: { color: C.offwhite }, line: { color: C.lightblue, pt: 1.2 } });
  s.addText([
    { text: "DWI Pattern Rule: ", options: { bold: true, color: C.navy, fontSize: 10 } },
    { text: "ADC ↑ = vasogenic (potentially reversible) | ADC ↓ = cytotoxic infarction (irreversible). Determines prognosis and guides treatment urgency.", options: { color: C.darknavy, fontSize: 10 } },
  ], { x: 0.28, y: 4.33, w: 9.4, h: 0.48, fontFace: "Calibri", margin: 0 });
}

// ══════════════════════════════════════════════════
// SLIDE 15 — SWI / GRE
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "SWI & GRE: The Blooming Effect", "Most sensitive for acute and cortical vein thrombosis");
  addFooter(s, 15);

  s.addText(makeBullets([
    "SWI (Susceptibility-Weighted Imaging) — most sensitive sequence for acute CSVT",
    "Deoxyhemoglobin in acute thrombus: pronounced T2* signal loss = BLOOMING effect",
    "Blooming exceeds actual size of thrombus on GRE — pathognomonic sign",
    "SWI superior to GRE: detects cortical vein thrombosis with sensitivity >90%",
    "SWI cord sign: hypointense thrombosed cortical vein visible on SWI",
    "Venous stasis and slow collateral flow also appear hypointense on SWI",
    "Chronic CSVT: hemosiderin deposition maintains SWI hypointensity",
    "SWI helps detect hemorrhagic venous infarction — petechial bleeds visible",
    "Always include SWI or GRE in routine CSVT MRI protocol",
  ]), { x: 0.22, y: 0.72, w: 5.0, h: 3.8, fontFace: "Calibri" });

  const img4 = getImg(4);
  if (img4) {
    s.addImage({ data: img4, x: 5.4, y: 0.72, w: 4.3, h: 3.3 });
    s.addText("SWI/GRE: Blooming effect — hypointense thrombus exceeds vessel size", {
      x: 5.4, y: 4.05, w: 4.3, h: 0.42, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 5.4, y: 0.72, w: 4.3, h: 3.3, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("SWI: Blooming hypointensity\nin thrombosed sinus/cortical vein", {
      x: 5.4, y: 1.95, w: 4.3, h: 1.0, fontSize: 11, color: C.midgray, fontFace: "Calibri", align: "center" });
  }
}

// ══════════════════════════════════════════════════
// SLIDE 16 — MR VENOGRAPHY
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "MR Venography (MRV)", "TOF, Phase-Contrast, and CE-MRV");
  addFooter(s, 16);

  const mrvTable = [
    [{ text: "Technique", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Principle", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Advantages", options: { bold: true, color: C.white, fill: C.navy } }, { text: "Limitations", options: { bold: true, color: C.white, fill: C.navy } }],
    [{ text: "2D TOF MRV", options: { color: C.darknavy } }, { text: "Flow-related enhancement", options: { color: C.darknavy } }, { text: "No contrast, widely available, sensitive", options: { color: C.darknavy } }, { text: "Artifacts from slow flow, saturation effects", options: { color: C.darknavy } }],
    [{ text: "Phase-Contrast MRV", options: { color: C.darknavy } }, { text: "Phase shifts of moving spins", options: { color: C.darknavy } }, { text: "Quantifies flow, no background suppression issues", options: { color: C.darknavy } }, { text: "Long acquisition, velocity-dependent", options: { color: C.darknavy } }],
    [{ text: "CE-MRV", options: { bold: true, color: C.blue } }, { text: "Gadolinium-enhanced T1 fat sat", options: { color: C.darknavy } }, { text: "Comparable to CTV, least artifact-prone, best for sinuses", options: { bold: true, color: C.blue } }, { text: "Requires IV contrast, timing critical", options: { color: C.darknavy } }],
    [{ text: "DSA", options: { color: C.gray } }, { text: "Digital subtraction catheter angio", options: { color: C.gray } }, { text: "Gold standard; interventional capability", options: { color: C.gray } }, { text: "Invasive, radiation, rarely needed diagnostically", options: { color: C.gray } }],
  ];
  s.addTable(mrvTable, {
    x: 0.22, y: 0.7, w: 9.55,
    colW: [1.6, 2.2, 3.3, 2.45],
    fontSize: 9.5, fontFace: "Calibri",
    border: { pt: 0.5, color: C.lightgray },
    rowH: 0.45
  });

  s.addText(makeBullets([
    "MRV finding in CSVT: ABSENT FLOW signal (filling defect) in affected sinus",
    "CE-MRV: thrombus appears as filling defect surrounded by enhancing collaterals",
    "TOF pitfall: slow flow mimics absent flow (check jugular foramen size for hypoplastic TS)",
    "Recommended: MRI brain + MRV as first-line combined imaging — sensitivity >95%",
  ]), { x: 0.22, y: 3.6, w: 9.55, h: 1.4, fontFace: "Calibri", fontSize: 10 });
}

// ══════════════════════════════════════════════════
// SLIDE 17 — MRV IMAGE SLIDE
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "MR Venography — Imaging Examples", "Absent flow in thrombosed sinuses");
  addFooter(s, 17);

  const img2 = getImg(2);
  const img5 = getImg(5);

  if (img2) {
    s.addImage({ data: img2, x: 0.22, y: 0.72, w: 4.65, h: 3.5 });
    s.addText("TOF MRV: Absent flow in SSS and transverse sinus (AJNR)", {
      x: 0.22, y: 4.25, w: 4.65, h: 0.4, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 0.22, y: 0.72, w: 4.65, h: 3.5, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("TOF MRV: Absent flow in SSS", { x: 0.22, y: 2.2, w: 4.65, h: 0.8, fontSize: 12, color: C.midgray, fontFace: "Calibri", align: "center" });
  }

  if (img5) {
    s.addImage({ data: img5, x: 5.13, y: 0.72, w: 4.65, h: 3.5 });
    s.addText("MRV: Deep venous system thrombosis — absent internal cerebral vein flow", {
      x: 5.13, y: 4.25, w: 4.65, h: 0.4, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 5.13, y: 0.72, w: 4.65, h: 3.5, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("CE-MRV: Filling defect in transverse sinus", { x: 5.13, y: 2.2, w: 4.65, h: 0.8, fontSize: 12, color: C.midgray, fontFace: "Calibri", align: "center" });
  }
}

// ══════════════════════════════════════════════════
// SLIDE 18 — SECTION DIVIDER: INDIRECT SIGNS
// ══════════════════════════════════════════════════
addSectionSlide(pres, 18, "Indirect MRI Signs", "Parenchymal consequences of CSVT", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 19 — VENOUS INFARCTION
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Venous Infarction", "Non-arterial distribution, often hemorrhagic");
  addFooter(s, 19);

  s.addText(makeBullets([
    "Occurs in 30–40% of CSVT cases — due to venous outflow obstruction",
    "Distribution: does NOT follow an arterial territory — crosses vascular boundaries",
    "Often BILATERAL and PARASAGITTAL in SSS thrombosis",
    "Frequently HEMORRHAGIC (40–60%): mix of vasogenic and cytotoxic edema",
    "Common locations by sinus involved:",
    "  - SSS: bilateral parasagittal cortex",
    "  - Transverse/sigmoid: ipsilateral temporal-occipital lobe, cerebellum",
    "  - Deep veins (ICVs): bilateral thalami, basal ganglia",
    "  - Straight sinus: bilateral thalamic edema",
    "  - Vein of Labbe: temporal lobe (unilateral)",
  ]), { x: 0.22, y: 0.72, w: 5.0, h: 4.0, fontFace: "Calibri" });

  const img6 = getImg(6);
  if (img6) {
    s.addImage({ data: img6, x: 5.3, y: 0.72, w: 4.4, h: 3.5 });
    s.addText("Hemorrhagic venous infarction — bilateral parasagittal distribution", {
      x: 5.3, y: 4.25, w: 4.4, h: 0.4, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 5.3, y: 0.72, w: 4.4, h: 3.5, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("Hemorrhagic venous infarct\n(bilateral parasagittal — SSS thrombosis)", {
      x: 5.3, y: 1.9, w: 4.4, h: 1.1, fontSize: 11, color: C.midgray, fontFace: "Calibri", align: "center" });
  }
}

// ══════════════════════════════════════════════════
// SLIDE 20 — DEEP VENOUS THROMBOSIS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Deep Cerebral Venous Thrombosis", "Bilateral thalamic involvement — a diagnostic challenge");
  addFooter(s, 20);

  s.addText(makeBullets([
    "DVT of deep cerebral veins: internal cerebral veins, vein of Galen, straight sinus",
    "Characteristic finding: BILATERAL THALAMIC edema/infarction",
    "Often mimics other conditions: encephalitis, metabolic disease, bilateral thalamic glioma",
    "Basal vein of Rosenthal thrombosis: medial temporal lobe edema",
    "DWI: bilateral thalamic restricted diffusion (cytotoxic edema)",
    "T1W: hyperintense ICVs on sagittal view is diagnostic",
    "MRV: absent vein of Galen and straight sinus flow",
    "Poor prognosis due to involvement of diencephalic structures",
    "Clinical: rapid onset coma, memory deficits, gaze abnormalities",
  ]), { x: 0.22, y: 0.72, w: 9.55, h: 3.8, fontFace: "Calibri" });

  s.addShape("rect", { x: 0.22, y: 4.6, w: 9.55, h: 0.5, fill: { color: C.offwhite }, line: { color: C.accent, pt: 1.5 } });
  s.addText("Red Flag: Bilateral thalamic signal abnormality on MRI — always consider deep CSVT before encephalitis or metabolic etiology.", {
    x: 0.28, y: 4.63, w: 9.4, h: 0.44, fontSize: 9.5, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });
}

// ══════════════════════════════════════════════════
// SLIDE 21 — CORTICAL VEIN THROMBOSIS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Isolated Cortical Vein Thrombosis (CoVT)", "Focal, challenging to detect — SWI is key");
  addFooter(s, 21);

  s.addText(makeBullets([
    "CoVT: thrombosis of cortical veins without dural sinus involvement",
    "Isolated CoVT accounts for ~6% of CSVT — underdiagnosed",
    "Clinical: focal neurological deficits, focal seizures, localized headache",
    "MRI Direct Signs:",
    "  - SWI/GRE: hypointense cord sign — the most sensitive finding",
    "  - T1W: focal hyperintense cortical vein (subacute)",
    "  - FLAIR: sulcal hyperintensity in affected region",
    "  - Post-Gd T1: vein enhancement or delta sign analog",
    "MRI Indirect Signs:",
    "  - Focal cortical/subcortical edema or infarction",
    "  - Hemorrhagic cortical contusion appearance",
    "  - Focal sulcal effacement",
    "Standard MRV (TOF): often NORMAL — CoVT not visible on conventional MRV",
    "CE-MRV or source images needed for cortical vein visualization",
  ]), { x: 0.22, y: 0.72, w: 9.55, h: 4.4, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════
// SLIDE 22 — SECTION DIVIDER: SITE-SPECIFIC
// ══════════════════════════════════════════════════
addSectionSlide(pres, 22, "Site-Specific Findings", "SSS, Transverse, Sigmoid, Cavernous Sinus", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 23 — SSS AND TRANSVERSE SINUS THROMBOSIS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "SSS & Transverse Sinus Thrombosis", "Most common CSVT locations");
  addFooter(s, 23);

  s.addText("Superior Sagittal Sinus (SSS)", { x: 0.22, y: 0.65, w: 4.75, h: 0.3, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Most common site (~70–80% of CSVT)",
    "Bilateral parasagittal cortical infarcts",
    "CT: dense triangle sign / cord sign along SSS",
    "MRI sagittal T1: loss of flow void, T1 hypersignal",
    "MRV: absent SSS flow on coronal MIP images",
    "Raised ICP: papilledema, empty sella, distended optic sheaths",
  ]), { x: 0.22, y: 0.98, w: 4.75, h: 2.0, fontFace: "Calibri" });

  s.addText("Transverse Sinus", { x: 0.22, y: 3.1, w: 4.75, h: 0.3, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Second most common site (~40–60% of CSVT)",
    "Often associated with otitis media/mastoiditis",
    "Right > left (usually dominant right TS)",
    "Ipsilateral temporal-occipital and cerebellar infarct",
    "Key pitfall: hypoplastic left TS — compare jugular foramina size",
  ]), { x: 0.22, y: 3.43, w: 4.75, h: 1.6, fontFace: "Calibri" });

  const img7 = getImg(7);
  if (img7) {
    s.addImage({ data: img7, x: 5.3, y: 0.72, w: 4.4, h: 3.9 });
    s.addText("SSS + transverse sinus CSVT — T1/T2/MRV correlation", {
      x: 5.3, y: 4.65, w: 4.4, h: 0.38, fontSize: 7.5, italic: true, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  } else {
    s.addShape("rect", { x: 5.3, y: 0.72, w: 4.4, h: 3.9, fill: { color: C.offwhite }, line: { color: C.lightgray } });
    s.addText("MRI multisequence:\nSSS and transverse sinus thrombosis", {
      x: 5.3, y: 2.2, w: 4.4, h: 1.1, fontSize: 11, color: C.midgray, fontFace: "Calibri", align: "center" });
  }
}

// ══════════════════════════════════════════════════
// SLIDE 24 — CAVERNOUS SINUS THROMBOSIS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Cavernous Sinus Thrombosis", "Septic vs aseptic — a dangerous entity");
  addFooter(s, 24);

  s.addText(makeBullets([
    "Cavernous sinus (CS): located at the anterior skull base — bilaterally",
    "Contains CN III, IV, V1, V2, VI and the internal carotid artery",
    "",
    "Etiology: Septic (most common) — facial/nasal infection spreading via facial veins",
    "  Causal organisms: S. aureus (most common), S. pneumoniae, gram-negatives",
    "  Aseptic: trauma, OCP, dehydration, hypercoagulable state",
    "",
    "Classic Clinical Triad: Proptosis + Chemosis + Ophthalmoplegia (CN VI most affected)",
    "  Plus: periorbital edema, fever (septic), vision loss",
    "",
    "MRI Findings:",
    "  - Enlargement and bulging of cavernous sinus",
    "  - Loss of normal flow void / heterogeneous signal",
    "  - Post-Gd: peripheral enhancement with central filling defect",
    "  - Orbital proptosis, periorbital fat stranding on T1/T2",
    "  - May show internal carotid artery narrowing",
    "  - Possible spread: meningitis, brain abscess, septic emboli",
    "",
    "CT/MRI both needed: CT for bony destruction/sinusitis, MRI for parenchymal involvement",
  ]), { x: 0.22, y: 0.72, w: 9.55, h: 4.5, fontFace: "Calibri", fontSize: 10.5 });
}

// ══════════════════════════════════════════════════
// SLIDE 25 — SECTION DIVIDER: DIFFERENTIAL DIAGNOSIS
// ══════════════════════════════════════════════════
addSectionSlide(pres, 25, "Differential Diagnosis & Pitfalls", "Mimics and false positives", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 26 — DIFFERENTIALS & PITFALLS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Differential Diagnosis & Imaging Pitfalls");
  addFooter(s, 26);

  const ddRows = [
    [{ text: "Mimic / Pitfall", options: { bold: true, color: C.white, fill: C.navy } }, { text: "How it Mimics CSVT", options: { bold: true, color: C.white, fill: C.navy } }, { text: "How to Distinguish", options: { bold: true, color: C.white, fill: C.navy } }],
    [{ text: "Hypoplastic Transverse Sinus", options: { color: C.darknavy } }, { text: "Absent TOF flow mimics occlusion", options: { color: C.darknavy } }, { text: "Compare jugular foramen size; CE-MRV shows normal small but patent sinus", options: { color: C.darknavy } }],
    [{ text: "Slow Flow / High Riding SSS", options: { color: C.darknavy } }, { text: "T1 hyperintensity without thrombosis", options: { color: C.darknavy } }, { text: "CE-MRV normal enhancement; no parenchymal changes", options: { color: C.darknavy } }],
    [{ text: "Arachnoid Granulations", options: { color: C.darknavy } }, { text: "Filling defect in sinus on CE-MRV/CTV", options: { color: C.darknavy } }, { text: "Smooth rounded margins, CSF density on CT, T2 hyperintense", options: { color: C.darknavy } }],
    [{ text: "Subdural Hematoma", options: { color: C.darknavy } }, { text: "Hyperdense TS can simulate SDH", options: { color: C.darknavy } }, { text: "Tubular shape of sinus thrombus vs crescent SDH; MRI confirms", options: { color: C.darknavy } }],
    [{ text: "Meningioma / Tumor", options: { color: C.darknavy } }, { text: "Dural sinus invasion", options: { color: C.darknavy } }, { text: "Enhancing mass with dural tail; CE-MRV demonstrates sinus patency vs occlusion", options: { color: C.darknavy } }],
    [{ text: "Arterial Infarct", options: { color: C.darknavy } }, { text: "Parenchymal edema/infarction", options: { color: C.darknavy } }, { text: "Arterial distribution vs non-arterial, non-gyral; check MRA for arterial occlusion", options: { color: C.darknavy } }],
    [{ text: "Encephalitis / Metabolic", options: { color: C.darknavy } }, { text: "Bilateral thalamic edema (DVT mimic)", options: { color: C.darknavy } }, { text: "MRV: absent deep venous flow; clinical context, CSF analysis", options: { color: C.darknavy } }],
  ];
  s.addTable(ddRows, {
    x: 0.22, y: 0.68, w: 9.55,
    colW: [2.25, 2.8, 4.5],
    fontSize: 9, fontFace: "Calibri",
    border: { pt: 0.5, color: C.lightgray },
    rowH: 0.36
  });
}

// ══════════════════════════════════════════════════
// SLIDE 27 — SECTION DIVIDER: MANAGEMENT
// ══════════════════════════════════════════════════
addSectionSlide(pres, 27, "Management & Treatment", "Anticoagulation, endovascular, monitoring", C.navy);

// ══════════════════════════════════════════════════
// SLIDE 28 — TREATMENT
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Treatment of CSVT", "Anticoagulation is the cornerstone — even with hemorrhage");
  addFooter(s, 28);

  s.addText("First-Line Therapy:", { x: 0.22, y: 0.65, w: 9.5, h: 0.3, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "ANTICOAGULATION — first-line in ALL patients, even with hemorrhagic venous infarction",
    "Acute phase: IV unfractionated heparin (UFH) or low-molecular-weight heparin (LMWH)",
    "UFH preferred if high risk of deterioration (allows rapid reversal)",
    "Transition to oral anticoagulants: warfarin (INR 2–3) OR direct oral anticoagulants (DOACs)",
    "DOACs (dabigatran, rivaroxaban): non-inferior to warfarin per ISCVT-2 & RE-SPECT trials (2023–2024)",
    "Duration: 3–6 months for provoked; 6–12 months for unprovoked; indefinite if underlying thrombophilia",
  ]), { x: 0.22, y: 0.98, w: 9.55, h: 1.9, fontFace: "Calibri" });

  s.addText("Symptomatic Treatment:", { x: 0.22, y: 2.95, w: 9.5, h: 0.28, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Seizures: antiepileptic drugs (AED) — levetiracetam first-line",
    "Elevated ICP: acetazolamide, serial LP, CSF diversion (shunt) for refractory cases",
    "Septic CSVT (cavernous): IV antibiotics + anticoagulation + surgical drainage if abscess",
  ]), { x: 0.22, y: 3.26, w: 9.55, h: 1.0, fontFace: "Calibri" });

  s.addText("Endovascular (reserved for severe cases):", { x: 0.22, y: 4.3, w: 9.55, h: 0.28, fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Catheter-directed thrombolysis (tPA) or mechanical thrombectomy in deteriorating patients despite anticoagulation",
    "Decompressive craniectomy if large hemorrhagic infarct with herniation risk",
  ]), { x: 0.22, y: 4.6, w: 9.55, h: 0.65, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════
// SLIDE 29 — PROGNOSIS & FOLLOW-UP IMAGING
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.white };
  addHeader(s, "Prognosis & Follow-Up Imaging", "Outcomes and recanalization monitoring");
  addFooter(s, 29);

  s.addText("Outcomes:", { x: 0.22, y: 0.65, w: 9.5, h: 0.28, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "Overall good outcome (mRS 0–2) in ~75–85% with appropriate treatment",
    "Mortality <5% in modern series",
    "Poor prognostic factors: altered consciousness, coma, deep CSVT, hemorrhagic infarct, malignancy, age >65",
    "Recanalization occurs in 80%+ of patients within 3–6 months",
    "Complete recanalization associated with better neurological outcomes",
    "Recurrence rate ~2–4% per year; higher in underlying thrombophilia",
  ]), { x: 0.22, y: 0.97, w: 4.8, h: 2.3, fontFace: "Calibri" });

  s.addText("Follow-Up Imaging Protocol:", { x: 0.22, y: 3.35, w: 9.5, h: 0.28, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
  s.addText(makeBullets([
    "MRI + MRV at 3–6 months to assess recanalization",
    "ADC normalization on DWI confirms edema resolution",
    "Persistent sinus occlusion despite 6 months anticoagulation: reassess duration",
    "Papilledema follow-up: ophthalmology and repeat MRI in IH cases",
    "If no recanalization at 12 months: unlikely to occur — chronic thrombosis",
  ]), { x: 0.22, y: 3.67, w: 4.8, h: 1.55, fontFace: "Calibri" });

  // Progress indicators
  const outcomes = [["75–85%", "Good outcome (mRS 0–2)"], ["80%+", "Recanalization by 6 mo"], ["<5%", "Mortality"], ["3–4%/yr", "Recurrence rate"]];
  outcomes.forEach((o, i) => {
    const xPos = 5.3 + (i % 2) * 2.3;
    const yPos = 0.95 + Math.floor(i / 2) * 1.45;
    s.addShape("rect", { x: xPos, y: yPos, w: 2.1, h: 1.1, fill: { color: C.offwhite }, line: { color: C.lightblue, pt: 1.5 } });
    s.addText(o[0], { x: xPos, y: yPos + 0.1, w: 2.1, h: 0.6, fontSize: 22, bold: true, color: C.blue, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(o[1], { x: xPos, y: yPos + 0.7, w: 2.1, h: 0.35, fontSize: 8, color: C.gray, fontFace: "Calibri", align: "center", margin: 0 });
  });
}

// ══════════════════════════════════════════════════
// SLIDE 30 — SUMMARY & KEY TAKEAWAYS
// ══════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.darknavy };
  s.addShape("rect", { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.accent }, line: { color: C.accent } });

  s.addText("Key Takeaways", {
    x: 0.4, y: 0.2, w: 9.3, h: 0.55, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 1
  });
  s.addShape("rect", { x: 0.4, y: 0.8, w: 6, h: 0.04, fill: { color: C.lightblue }, line: { color: C.lightblue } });

  const takeaways = [
    ["01", "MRI + MRV", "Gold standard imaging — sensitivity >95%. Include T1W, T2W, FLAIR, DWI, SWI, and MRV in every suspected CSVT protocol."],
    ["02", "Stage-dependent signal", "Acute CSVT hardest to detect (isointense T1). SWI blooming is most sensitive in acute phase."],
    ["03", "Non-arterial pattern", "Venous infarction crosses vascular boundaries, often bilateral, frequently hemorrhagic — distinct from arterial stroke."],
    ["04", "Bilateral thalami", "Bilateral thalamic edema = deep CSVT until proven otherwise. Don't diagnose encephalitis first."],
    ["05", "Anticoagulate", "Treat with heparin/LMWH even with hemorrhage — this is the cornerstone of management."],
    ["06", "Pitfalls matter", "Hypoplastic TS, slow flow, arachnoid granulations — always verify with CE-MRV before diagnosing CSVT."],
  ];

  takeaways.forEach((t, i) => {
    const yPos = 1.0 + i * 0.73;
    s.addShape("rect", { x: 0.4, y: yPos, w: 0.42, h: 0.42, fill: { color: C.blue }, line: { color: C.blue } });
    s.addText(t[0], { x: 0.4, y: yPos, w: 0.42, h: 0.42, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(t[1] + ": ", { x: 0.92, y: yPos + 0.02, w: 1.6, h: 0.38, fontSize: 10, bold: true, color: C.lightblue, fontFace: "Calibri", valign: "middle", margin: 0 });
    s.addText(t[2], { x: 2.55, y: yPos + 0.02, w: 7.2, h: 0.38, fontSize: 10, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
  });

  s.addText("Cerebral Sinus Venous Thrombosis  |  Neuroradiology  |  June 2026", {
    x: 0.4, y: 5.25, w: 9.3, h: 0.3, fontSize: 8, color: C.midgray, fontFace: "Calibri"
  });
}

// ─── Write file ─────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/csvt-ppt/CSVT_Neuroradiology.pptx" })
  .then(() => console.log("DONE: CSVT_Neuroradiology.pptx written successfully"))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/csvt-ppt && node build_csvt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/csvt-ppt/CSVT_Neuroradiology.pptx

Your presentation is ready:

CSVT Neuroradiology

Presentation · PPTX


What's in the 30 slides:
#Content
1Title slide — bold navy + white design
2Presentation outline (12 sections)
3Section divider: Introduction
4Definition & Epidemiology (stats boxes)
5Anatomy of cerebral venous system
6Pathophysiology — Virchow's Triad
7Clinical presentation + risk factor table
8Section divider: Imaging Protocols
9Imaging protocol comparison table (CT/MRI/MRV/DSA)
10Section divider: Direct MRI Signs
11Thrombus signal evolution table (hyperacute → chronic)
12T1W — T1 hypersignal (with MRI image)
13T2W & FLAIR — flow void loss (with MRI image)
14DWI/ADC — vasogenic vs cytotoxic edema
15SWI/GRE — blooming effect (with MRI image)
16MR Venography techniques table (TOF / PC / CE-MRV)
17MRV imaging examples (dual MRI images)
18Section divider: Indirect Signs
19Venous infarction (with MRI image)
20Deep cerebral venous thrombosis — bilateral thalami
21Isolated cortical vein thrombosis (CoVT)
22Section divider: Site-Specific
23SSS & Transverse sinus thrombosis (with MRI image)
24Cavernous sinus thrombosis
25Section divider: Differential Diagnosis
26Differentials & pitfalls table (8 mimics)
27Section divider: Management
28Treatment — anticoagulation, endovascular
29Prognosis & follow-up imaging (outcome stats)
30Summary — 6 key takeaways (dark navy closing slide)
Design: Clean white slides with navy header bar, red accent strip, Calibri font. 5 real MRI images embedded (from Radiology Assistant + Springer). Slides where images were blocked by paywalls (AJNR, RSNA) show clean labeled placeholder boxes.

https://orris.care/shared/chat/37c0ab53-7edf-4b66-9c03-023ce419e64d

Reading Web Page

https://orris.care/shared/chat/37c0ab53-7edf-4b66-9c03-023ce…

That link points to the shared version of our previous conversation - the CSVT neuroradiology presentation we just built together. It's a public share link that shows the full chat including the 30-slide breakdown and the download link.
The PPTX file from that session is still available here:

CSVT Neuroradiology

Presentation · PPTX

Is there something specific you wanted to do with it - edit slides, add content, change the design, or something else?

Unable to open ppt

Running Command

ls -lh /home/daytona/workspace/csvt-ppt/ && node --version && node -e "require('pptxgenjs'); console.log('pptxgenjs OK')"

Running Command

cd /home/daytona/workspace/csvt-ppt && python3 -c " from pptx import Presentation prs = Presentation('CSVT_Neuroradiology.pptx') print(f'Slides: {len(prs.slides)}') print(f'Slide width: {prs.slide_width.inches:.2f} inches') print(f'Slide height: {prs.slide_height.inches:.2f} inches') print('File is valid PPTX') "

Running Command

# Validate ZIP structure of PPTX (PPTX is a ZIP file) cd /home/daytona/workspace/csvt-ppt && python3 -c " import zipfile, sys try: with zipfile.ZipFile('CSVT_Neuroradiology.pptx', 'r') as z: names = z.namelist() slide_count = sum(1 for n in names if n.startswith('ppt/slides/slide') and n.endswith('.xml')) print(f'Valid ZIP/PPTX: YES') print(f'Slide XMLs found: {slide_count}') print(f'Total entries: {len(names)}') except Exception as e: print(f'Error: {e}') "

Running Command

cd /home/daytona/workspace/csvt-ppt && libreoffice --headless --convert-to pdf CSVT_Neuroradiology.pptx --outdir . 2>&1

Running Command

mkdir -p /home/daytona/workspace/csvt-ppt/output && cp /home/daytona/workspace/csvt-ppt/CSVT_Neuroradiology.pptx /home/daytona/workspace/csvt-ppt/output/ && libreoffice --headless --convert-to pdf /home/daytona/workspace/csvt-ppt/output/CSVT_Neuroradiology.pptx --outdir /home/daytona/workspace/csvt-ppt/output/ 2>&1

Running Command

# Try with a temp home for LibreOffice export HOME=/tmp/lo_home && mkdir -p $HOME && libreoffice --headless --convert-to pdf /home/daytona/workspace/csvt-ppt/CSVT_Neuroradiology.pptx --outdir /tmp/ 2>&1 && ls -lh /tmp/CSVT_Neuroradiology.pdf 2>/dev/null || echo "PDF not created"

Running Command

cp /tmp/CSVT_Neuroradiology.pdf /home/daytona/workspace/csvt-ppt/CSVT_Neuroradiology.pdf && ls -lh /home/daytona/workspace/csvt-ppt/

Both files are ready. The PPTX is structurally valid (30 slides confirmed), so the issue is likely on the viewing end. Here are both formats:
PowerPoint:

CSVT Neuroradiology

Presentation · PPTX

PDF (all 30 slides - open anywhere):

CSVT Neuroradiology

PDF Document · PDF


If the PPTX still won't open, try these fixes:
  1. Right-click → Save As the .pptx link (don't just click it) - browser may be trying to open it inline
  2. Open with Google Slides (upload to drive.google.com) - works without PowerPoint installed
  3. Use LibreOffice Impress (free) if you don't have MS Office
  4. The PDF version above will open immediately in any browser or PDF reader - use it if you just need to view/present the slides
This is a shared conversation. Sign in to Orris to start your own chat.