TANAKA INDEX CT SCAN OF INCISIONAL HENIA\
Tanaka index incisional hernia CT scan
Tanaka index CT scan incisional hernia formula calculation significance
Tanaka index CT scan incisional hernia loss of domain volumetry
https://www.frontierspartnerships.org/journals/journal-of-ab…
Tanaka Index (TI) = HSV / ACV
| Term | Definition |
|---|---|
| HSV | Hernia Sac Volume |
| ACV | Abdominal Cavity Volume |
V = (π/6) × L × W × H
| Tanaka Index Value | Interpretation |
|---|---|
| < 0.25 | No significant loss of domain; standard repair feasible |
| > 0.25 | Loss of domain hernia; complex repair required |
| 0.25 - 0.30 | Mild LOD - TAR (Transversus Abdominis Release) alone |
| 0.31 - 0.35 | Moderate LOD - TAR + peritoneal flap reinforcement |
| > 0.35 | Severe LOD - preoperative preparation required (Botulinum toxin + Progressive Pneumoperitoneum), then TAR + peritoneal flap |
CT Abdomen
|
Calculate TI = HSV / ACV
|
TI < 0.25 ─────────────────────────────────┐
| |
TI > 0.25 (Loss of Domain) Defect size guides:
| <12cm: Onlay mesh
├── 0.25-0.30: TAR alone >12cm: TAR + retrorectus mesh
|
├── 0.31-0.35: TAR + peritoneal flap
|
└── >0.35: BT injections + PPP (Days 1-24)
→ Surgery Day 24-30
→ TAR + peritoneal flap
| Feature | Tanaka Method | Sabbagh Method |
|---|---|---|
| Formula | HSV / ACV | HSV / (ACV + HSV) |
| LOD threshold | > 0.25 | > 20% |
| Volume method | Ellipsoid formula | Semi-automated volumetry |
| Posterior ACV boundary | Anterior aspect of vertebral body | Anterior aspect of vertebral body |
| Complexity | Simple, manual | More precise, semi-automated |
PRIVED IMAGES GOW TO MEASURES HSV AND ACV
CT scan hernia sac volume abdominal cavity volume measurement Tanaka index
Tanaka index CT scan how to measure HSV ACV hernia sac abdominal cavity volume images diagrams
Volume = 0.52 × a × b × c
| Structure | Cranial limit | Caudal limit | Anterior limit | Posterior limit |
|---|---|---|---|---|
| ACV | First slice showing diaphragm | Last slice showing coccyx | Line joining healthy anterior muscle groups | Line through transverse processes of vertebrae |
| HSV | Parietal peritoneum of sac (cranial) | Parietal peritoneum of sac (caudal) | Outer skin/sac wall | Same posterior line as ACV |
Always take the largest single measurement across all slices - do not average; use the maximum diameter found anywhere in the scan.
HSV (mL) = 0.52 × a(CC) × b(Transverse) × c(AP)
ACV (mL) = 0.52 × A(CC) × B(Transverse) × C(AP)
Tanaka Index = HSV / ACV
< 0.25 → No LOD → Standard repair
0.25-0.30 → LOD → TAR technique
0.31-0.35 → LOD → TAR + peritoneal flap
> 0.35 → Severe LOD → Botox + PPP preoperatively, then TAR
Make ppt from this data
mkdir -p /tmp/workspace/tanaka-pptx && python /tmp/skills/shared/scripts/fetch_images.py "https://epos.myesr.org/posterimage/esr/ecr2025/167480/media/993460" "https://epos.myesr.org/posterimage/esr/ecr2025/167480/media/993461" 2>/dev/null | python3 -c " import json, base64, sys data = json.load(sys.stdin) for i, img in enumerate(data): if img.get('base64'): raw = base64.b64decode(img['base64'].split(',')[1] if ',' in img['base64'] else img['base64']) with open(f'/tmp/workspace/tanaka-pptx/ct_image_{i+1}.jpg', 'wb') as f: f.write(raw) print(f'Saved ct_image_{i+1}.jpg, size={len(raw)}') else: print(f'Image {i+1} failed: {img.get(\"error\")}') "
~/tanaka-pptx/build_pptx.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
import copy
# ── Palette ──────────────────────────────────────────────────────────────────
DARK_BLUE = RGBColor(0x0D, 0x2B, 0x55) # slide backgrounds / header bar
MID_BLUE = RGBColor(0x1A, 0x5F, 0x9E) # accent / subtitle bar
ACCENT_GOLD = RGBColor(0xF0, 0xC4, 0x2F) # key highlight
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GREY = RGBColor(0xF2, 0xF4, 0xF8)
TEXT_DARK = RGBColor(0x1A, 0x1A, 0x2E)
GREEN = RGBColor(0x27, 0xAE, 0x60)
RED = RGBColor(0xC0, 0x39, 0x2B)
ORANGE = RGBColor(0xE6, 0x7E, 0x22)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]
# ── Helper functions ─────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_color, alpha=None):
from pptx.util import Inches
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
shape.line.fill.background()
return shape
def add_text(slide, text, x, y, w, h, size=18, bold=False, color=WHITE,
align=PP_ALIGN.LEFT, italic=False, wrap=True, valign=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = valign
tf.margin_left = Pt(0)
tf.margin_right = Pt(0)
tf.margin_top = Pt(0)
tf.margin_bottom= Pt(0)
p = tf.paragraphs[0]
p.alignment = align
r = p.add_run()
r.text = text
r.font.size = Pt(size)
r.font.bold = bold
r.font.italic = italic
r.font.color.rgb = color
r.font.name = "Calibri"
return tb
def add_multiline(slide, lines, x, y, w, h, size=16, color=WHITE,
bold_first=False, line_spacing=1.15, align=PP_ALIGN.LEFT):
"""lines = list of (text, bold, color_override_or_None)"""
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = Pt(2)
from pptx.oxml.ns import qn
from lxml import etree
for i, (txt, bold, col) in enumerate(lines):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.alignment = align
# line spacing
p.line_spacing = line_spacing
r = p.add_run()
r.text = txt
r.font.size = Pt(size)
r.font.bold = bold
r.font.color.rgb = col if col else color
r.font.name = "Calibri"
return tb
def bg(slide, color=DARK_BLUE):
add_rect(slide, 0, 0, 13.333, 7.5, color)
def header_bar(slide, title, subtitle=None):
add_rect(slide, 0, 0, 13.333, 1.1, DARK_BLUE)
add_rect(slide, 0, 1.1, 13.333, 0.07, ACCENT_GOLD)
add_text(slide, title, 0.35, 0.08, 12.5, 0.8,
size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE)
if subtitle:
add_text(slide, subtitle, 0.35, 0.82, 12, 0.35,
size=13, bold=False, color=ACCENT_GOLD, align=PP_ALIGN.LEFT)
def slide_number(slide, n, total):
add_text(slide, f"{n} / {total}", 12.6, 7.15, 0.7, 0.3,
size=10, color=RGBColor(0xAA, 0xAA, 0xAA), align=PP_ALIGN.RIGHT)
# ── Build slides ─────────────────────────────────────────────────────────────
TOTAL = 10
# ─────────────────────────────────────────────────────────────────
# SLIDE 1 – Title
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, DARK_BLUE)
# decorative diagonal band
add_rect(s, 0, 5.5, 13.333, 2.0, MID_BLUE)
add_rect(s, 0, 5.47, 13.333, 0.08, ACCENT_GOLD)
add_text(s, "TANAKA INDEX", 1.0, 1.3, 11.5, 1.5,
size=52, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_text(s, "CT Scan Assessment of Incisional Hernia", 1.0, 2.9, 11.5, 0.8,
size=26, bold=False, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
add_text(s, "Loss of Domain | Volumetric Measurement | Surgical Planning",
1.0, 3.7, 11.5, 0.6,
size=16, bold=False, italic=True,
color=RGBColor(0xBB, 0xCC, 0xEE), align=PP_ALIGN.CENTER)
add_text(s, "Tanaka EY et al. Hernia 2010; 14:63-69",
1.0, 5.7, 11.5, 0.5,
size=13, color=RGBColor(0xCC, 0xCC, 0xCC), align=PP_ALIGN.CENTER)
slide_number(s, 1, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 2 – What is Loss of Domain?
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "What is Loss of Domain (LOD)?",
"The clinical problem that the Tanaka Index solves")
# Left panel – definition box
add_rect(s, 0.35, 1.3, 5.8, 5.6, DARK_BLUE)
add_rect(s, 0.35, 1.3, 5.8, 0.55, MID_BLUE)
add_text(s, "DEFINITION", 0.55, 1.32, 5.4, 0.5,
size=14, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE)
defn_lines = [
("Loss of domain occurs when herniated viscera can NO", False, None),
("longer be safely returned to the abdominal cavity", False, None),
("", False, None),
("The hernia sac has effectively become part of the", False, None),
("'functional abdominal domain'", True, ACCENT_GOLD),
("", False, None),
("Forceful reduction raises intra-abdominal pressure", False, None),
("(IAP) dangerously → risk of Abdominal Compartment", False, None),
("Syndrome (ACS)", True, RGBColor(0xFF, 0x88, 0x88)),
]
add_multiline(s, defn_lines, 0.5, 2.0, 5.5, 4.8, size=15, color=WHITE)
# Right panel – consequences
add_rect(s, 6.5, 1.3, 6.5, 5.6, WHITE)
add_rect(s, 6.5, 1.3, 6.5, 0.55, RED)
add_text(s, "WHY IT MATTERS", 6.7, 1.32, 6.0, 0.5,
size=14, bold=True, color=WHITE, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE)
conseq = [
("Respiratory compromise post-reduction", True, RED),
(" - Diaphragmatic elevation reduces FRC", False, TEXT_DARK),
(" - Risk of ventilatory failure", False, TEXT_DARK),
("", False, None),
("Cardiovascular compromise", True, RED),
(" - IVC compression → reduced venous return", False, TEXT_DARK),
("", False, None),
("Bowel ischemia / abdominal compartment syndrome", True, RED),
("", False, None),
("Wound closure under tension → recurrence", True, RED),
("", False, None),
("Pre-operative preparation is MANDATORY", True, MID_BLUE),
(" when LOD is identified on CT", False, TEXT_DARK),
]
add_multiline(s, conseq, 6.6, 2.0, 6.2, 4.8, size=13.5, color=TEXT_DARK)
slide_number(s, 2, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 3 – The Tanaka Formula
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "The Tanaka Index Formula", "Objective CT-based quantification of loss of domain")
# Big formula box
add_rect(s, 1.0, 1.3, 11.333, 1.6, DARK_BLUE)
add_text(s, "Tanaka Index = HSV ÷ ACV", 1.0, 1.35, 11.333, 1.5,
size=38, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
# Three columns: HSV | ACV | Volume formula
col_w = 3.6
for i, (title, body, col_color) in enumerate([
("HSV", "Hernia Sac Volume\n\nMeasured from the neck of\nthe defect to the outermost\nextent of the hernial sac", MID_BLUE),
("ACV", "Abdominal Cavity Volume\n\nMeasured from diaphragm\n(cranially) to coccyx\n(caudally)", GREEN),
("Volume Formula", "V = 0.52 × a × b × c\n\na = cranio-caudal (CC)\nb = transverse (latero-lateral)\nc = anteroposterior (AP)\n\n0.52 = π/6 ≈ simplified", ORANGE),
]):
x = 0.35 + i * (col_w + 0.22)
add_rect(s, x, 3.1, col_w, 0.55, col_color)
add_text(s, title, x, 3.12, col_w, 0.5,
size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_rect(s, x, 3.65, col_w, 3.5, WHITE)
add_text(s, body, x + 0.1, 3.75, col_w - 0.2, 3.3,
size=14, bold=False, color=TEXT_DARK, align=PP_ALIGN.LEFT, wrap=True)
# Threshold callout
add_rect(s, 4.5, 6.9, 4.333, 0.5, ACCENT_GOLD)
add_text(s, "Threshold: TI > 0.25 = Loss of Domain", 4.5, 6.9, 4.333, 0.5,
size=14, bold=True, color=DARK_BLUE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 3, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 4 – CT Landmarks: ACV
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "CT Landmarks: Abdominal Cavity Volume (ACV)",
"Pink/Magenta arrows on CT = ACV measurements")
# Info boxes left
landmarks = [
("CRANIAL LIMIT", "First axial slice showing the diaphragm", MID_BLUE),
("CAUDAL LIMIT", "Last axial slice showing the coccyx", MID_BLUE),
("ANTERIOR LIMIT","Line joining the healthy anterior muscle groups\n(not the skin / subcutaneous fat)", GREEN),
("POSTERIOR LIMIT","Line through the TRANSVERSE PROCESSES\nof the vertebrae\n(NOT the anterior vertebral body)", ORANGE),
("LATERAL LIMITS", "Parietal peritoneum on each side\nof the abdominal cavity", MID_BLUE),
]
box_h = 0.95
for i, (lbl, desc, col) in enumerate(landmarks):
y = 1.35 + i * (box_h + 0.07)
add_rect(s, 0.3, y, 2.1, box_h, col)
add_text(s, lbl, 0.3, y, 2.1, box_h,
size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_rect(s, 2.4, y, 4.5, box_h, WHITE)
add_text(s, desc, 2.5, y + 0.05, 4.3, box_h - 0.1,
size=12, bold=False, color=TEXT_DARK, wrap=True)
# Diagram schematic right
add_rect(s, 7.3, 1.3, 5.7, 5.9, WHITE)
add_rect(s, 7.3, 1.3, 5.7, 0.45, DARK_BLUE)
add_text(s, "SAGITTAL VIEW – ACV Boundaries", 7.3, 1.3, 5.7, 0.45,
size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
diagram_lines = [
("─── Diaphragm (CRANIAL limit) ───", False, MID_BLUE),
("", False, None),
(" | ←── Anterior wall", False, GREEN),
(" | (muscle line)", False, GREEN),
(" |", False, TEXT_DARK),
(" A | ← Abdominal → | Vertebra", False, TEXT_DARK),
(" C | Cavity (ACV) | (Posterior)", False, TEXT_DARK),
(" V | | limit =", False, TEXT_DARK),
(" | | Transverse", False, ORANGE),
(" | | process", False, ORANGE),
("", False, None),
("─── Coccyx (CAUDAL limit) ───", False, MID_BLUE),
("", False, None),
("Measure: CC (a) × Transverse (b) × AP (c)", True, DARK_BLUE),
("ACV = 0.52 × a × b × c", True, MID_BLUE),
]
add_multiline(s, diagram_lines, 7.4, 1.85, 5.5, 5.3, size=12, color=TEXT_DARK)
slide_number(s, 4, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 5 – CT Landmarks: HSV
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "CT Landmarks: Hernia Sac Volume (HSV)",
"Green arrows on CT = HSV measurements")
hsv_lm = [
("CRANIAL LIMIT", "Parietal peritoneum of the hernia sac\nat its cranial extent (defect neck)", GREEN),
("CAUDAL LIMIT", "Parietal peritoneum of the hernia sac\nat its most caudal point", GREEN),
("ANTERIOR LIMIT", "Outer wall of hernia sac\n(parietal peritoneum / subcutaneous tissue)", GREEN),
("POSTERIOR LIMIT","SAME LINE as ACV posterior limit\n(transverse processes of vertebrae)\n→ ensures no double-counting", ORANGE),
("LATERAL LIMITS", "Parietal peritoneum of the hernia\nsac on each side", GREEN),
("KEY RULE", "Take the LARGEST measurement from any\nCT slice — do NOT average. Use maximum\ndiameter found across the entire scan.", RED),
]
box_h = 0.9
for i, (lbl, desc, col) in enumerate(hsv_lm):
y = 1.35 + i * (box_h + 0.06)
add_rect(s, 0.3, y, 2.1, box_h, col)
add_text(s, lbl, 0.3, y, 2.1, box_h,
size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_rect(s, 2.4, y, 4.9, box_h, WHITE)
add_text(s, desc, 2.5, y + 0.05, 4.7, box_h - 0.1,
size=12, bold=False, color=TEXT_DARK, wrap=True)
# Right panel
add_rect(s, 7.7, 1.3, 5.3, 5.9, DARK_BLUE)
add_rect(s, 7.7, 1.3, 5.3, 0.45, GREEN)
add_text(s, "STEP-BY-STEP MEASUREMENT", 7.7, 1.3, 5.3, 0.45,
size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
steps = [
("STEP 1", "On AXIAL slices:", "Measure widest TRANSVERSE (b) and\nAP (c) diameters of hernia sac", GREEN),
("STEP 2", "On SAGITTAL slices:", "Measure CRANIO-CAUDAL (a)\nheight of hernia sac", GREEN),
("STEP 3", "Apply formula:", "HSV = 0.52 × a × b × c", ACCENT_GOLD),
("STEP 4", "Repeat for ACV:", "Same process using ACV landmarks\nACV = 0.52 × A × B × C", MID_BLUE),
("STEP 5", "Calculate TI:", "TI = HSV / ACV\n> 0.25 = Loss of Domain", RED),
]
y0 = 1.95
for snum, slbl, sdesc, col in steps:
add_rect(s, 7.8, y0, 0.75, 0.72, col)
add_text(s, snum, 7.8, y0, 0.75, 0.72,
size=10, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_text(s, slbl, 8.65, y0, 1.5, 0.3,
size=11, bold=True, color=ACCENT_GOLD)
add_text(s, sdesc, 8.65, y0 + 0.3, 4.1, 0.5,
size=11, color=WHITE, wrap=True)
y0 += 0.88
slide_number(s, 5, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 6 – CT Image Case 1 (moderate LOD)
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, RGBColor(0x10, 0x10, 0x10))
header_bar(s, "CT Case 1: Moderate Incisional Hernia (TI < 0.25)",
"Pink arrows = ACV measurements | Green arrows = HSV measurements")
# Insert CT image
s.shapes.add_picture("/tmp/workspace/tanaka-pptx/ct_image_1.jpg",
Inches(0.25), Inches(1.3), Inches(8.8), Inches(5.8))
# Result panel right
add_rect(s, 9.25, 1.3, 3.8, 5.8, DARK_BLUE)
add_rect(s, 9.25, 1.3, 3.8, 0.5, MID_BLUE)
add_text(s, "MEASUREMENTS", 9.25, 1.3, 3.8, 0.5,
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
meas_lines = [
("ACV Diameters (pink):", True, ACCENT_GOLD),
(" Transverse (B) = 17.9 cm", False, WHITE),
(" AP (C) = 29.7 cm", False, WHITE),
(" CC (A) = 34.2 cm", False, WHITE),
("", False, None),
("HSV Diameters (green):", True, GREEN),
(" CC (a) = 15.1 cm", False, WHITE),
(" AP (c) = 6.5 cm", False, WHITE),
(" Transverse (b) = 20.5 cm", False, WHITE),
("", False, None),
("RESULTS:", True, ACCENT_GOLD),
(" HSV = 1,046 mL", False, WHITE),
(" ACV = 9,454 mL", False, WHITE),
("", False, None),
]
add_multiline(s, meas_lines, 9.3, 2.0, 3.6, 4.0, size=13)
# Result badge
add_rect(s, 9.3, 6.2, 3.6, 0.75, GREEN)
add_text(s, "TI = 0.11 (<0.25)\nNO Loss of Domain", 9.3, 6.2, 3.6, 0.75,
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 6, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 7 – CT Image Case 2 (massive LOD)
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, RGBColor(0x10, 0x10, 0x10))
header_bar(s, "CT Case 2: Massive Loss of Domain Hernia (TI > 0.25)",
"Pink arrows = ACV measurements | Green arrows = HSV measurements")
s.shapes.add_picture("/tmp/workspace/tanaka-pptx/ct_image_2.jpg",
Inches(0.25), Inches(1.3), Inches(8.8), Inches(5.8))
add_rect(s, 9.25, 1.3, 3.8, 5.8, DARK_BLUE)
add_rect(s, 9.25, 1.3, 3.8, 0.5, RED)
add_text(s, "MEASUREMENTS", 9.25, 1.3, 3.8, 0.5,
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
meas2 = [
("ACV Diameters (pink):", True, ACCENT_GOLD),
(" Multiple slices measured", False, WHITE),
(" across axial + sagittal views", False, WHITE),
("", False, None),
("HSV Diameters (green):", True, GREEN),
(" Measured axial + sagittal", False, WHITE),
(" Note: HSV > ACV in this case", True, RGBColor(0xFF, 0x88, 0x88)),
("", False, None),
("RESULTS:", True, ACCENT_GOLD),
(" HSV = 7,819 mL", False, WHITE),
(" ACV = 7,003 mL", False, WHITE),
("", False, None),
("Ratio = 7819/7003 = 1.12", True, ACCENT_GOLD),
]
add_multiline(s, meas2, 9.3, 2.0, 3.6, 4.1, size=13)
add_rect(s, 9.3, 6.2, 3.6, 0.75, RED)
add_text(s, "TI = 1.12 (>>0.25)\nMASSIVE Loss of Domain", 9.3, 6.2, 3.6, 0.75,
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 7, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 8 – Tanaka Index Threshold & Grading
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "Tanaka Index: Thresholds & Clinical Grading",
"Guides surgical decision-making for incisional hernia repair")
tiers = [
("TI < 0.25", "No Loss of Domain", "Standard repair - proceed directly to surgery",
"Onlay mesh / Retrorectus mesh / Component separation\nbased on defect size (<12cm vs >12cm)",
GREEN, "NO LOD"),
("TI 0.25-0.30", "Mild LOD", "Component separation required",
"Transversus Abdominis Release (TAR) alone\nDirect surgery without preoperative preparation",
ORANGE, "MILD"),
("TI 0.31-0.35", "Moderate LOD", "Advanced reconstruction required",
"TAR + Peritoneal flap reinforcement\nDirect surgery without preoperative preparation",
RGBColor(0xE0, 0x60, 0x10), "MODERATE"),
("TI > 0.35", "Severe LOD", "Preoperative preparation MANDATORY",
"Botulinum Toxin (BT) injections + Progressive Pneumoperitoneum (PPP)\n→ Wait 24-30 days → TAR + Peritoneal flap",
RED, "SEVERE"),
]
col_x = [0.3, 2.0, 4.2, 7.5, 11.0]
col_w_list = [1.6, 2.0, 3.1, 3.3, 2.1]
headers = ["TI VALUE", "GRADE", "DECISION", "SURGICAL APPROACH", "PREOP PREP"]
# Header row
for j, (hdr, cx, cw) in enumerate(zip(headers, col_x, col_w_list)):
add_rect(s, cx, 1.35, cw, 0.5, DARK_BLUE)
add_text(s, hdr, cx, 1.35, cw, 0.5,
size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
row_h = 1.18
for i, (ti_val, grade, decision, approach, color, badge) in enumerate(tiers):
y = 1.97 + i * (row_h + 0.05)
bg_color = RGBColor(0xF8, 0xF8, 0xF8) if i % 2 == 0 else WHITE
# TI value
add_rect(s, col_x[0], y, col_w_list[0], row_h, color)
add_text(s, ti_val, col_x[0], y, col_w_list[0], row_h,
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
# Grade
add_rect(s, col_x[1], y, col_w_list[1], row_h, bg_color)
add_text(s, grade, col_x[1] + 0.05, y + 0.1, col_w_list[1] - 0.1, row_h - 0.2,
size=13, bold=True, color=color, wrap=True)
# Decision
add_rect(s, col_x[2], y, col_w_list[2], row_h, bg_color)
add_text(s, decision, col_x[2] + 0.05, y + 0.1, col_w_list[2] - 0.1, row_h - 0.2,
size=11, color=TEXT_DARK, wrap=True)
# Approach
add_rect(s, col_x[3], y, col_w_list[3], row_h, bg_color)
add_text(s, approach, col_x[3] + 0.05, y + 0.05, col_w_list[3] - 0.1, row_h - 0.1,
size=10.5, color=TEXT_DARK, wrap=True)
# Preop badge
add_rect(s, col_x[4], y + 0.2, col_w_list[4], row_h - 0.4, color)
add_text(s, badge, col_x[4], y + 0.2, col_w_list[4], row_h - 0.4,
size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 8, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 9 – Tanaka vs Sabbagh Comparison
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, LIGHT_GREY)
header_bar(s, "Tanaka vs. Sabbagh Method",
"Two validated CT volumetric methods for Loss of Domain assessment")
# Left - Tanaka
add_rect(s, 0.3, 1.3, 6.0, 5.9, DARK_BLUE)
add_rect(s, 0.3, 1.3, 6.0, 0.55, MID_BLUE)
add_text(s, "TANAKA METHOD", 0.3, 1.3, 6.0, 0.55,
size=17, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
tanaka_lines = [
("Formula:", True, ACCENT_GOLD),
(" LOD = HSV / ACV", False, WHITE),
("", False, None),
("Threshold:", True, ACCENT_GOLD),
(" > 0.25 = Loss of Domain", False, WHITE),
("", False, None),
("Volume method:", True, ACCENT_GOLD),
(" Ellipsoid formula (manual)", False, WHITE),
(" V = 0.52 × a × b × c", False, WHITE),
("", False, None),
("ACV Posterior boundary:", True, ACCENT_GOLD),
(" Transverse processes of vertebrae", False, WHITE),
("", False, None),
("Complexity:", True, ACCENT_GOLD),
(" Simple - fully manual on PACS", False, WHITE),
(" No special software required", False, WHITE),
]
add_multiline(s, tanaka_lines, 0.5, 2.0, 5.7, 5.0, size=13.5, color=WHITE)
# Right - Sabbagh
add_rect(s, 6.8, 1.3, 6.2, 5.9, WHITE)
add_rect(s, 6.8, 1.3, 6.2, 0.55, GREEN)
add_text(s, "SABBAGH METHOD", 6.8, 1.3, 6.2, 0.55,
size=17, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
sabbagh_lines = [
("Formula:", True, GREEN),
(" LOD = HSV / (ACV + HSV) × 100%", False, TEXT_DARK),
("", False, None),
("Threshold:", True, GREEN),
(" > 20% = Loss of Domain", False, TEXT_DARK),
("", False, None),
("Volume method:", True, GREEN),
(" Semi-automated volumetry", False, TEXT_DARK),
(" (more precise but needs software)", False, TEXT_DARK),
("", False, None),
("ACV Posterior boundary:", True, GREEN),
(" Anterior aspect of vertebral body", False, TEXT_DARK),
("", False, None),
("Complexity:", True, GREEN),
(" More accurate, semi-automated", False, TEXT_DARK),
(" Correlation with Tanaka: r = 0.91", False, TEXT_DARK),
]
add_multiline(s, sabbagh_lines, 7.0, 2.0, 5.8, 5.0, size=13.5, color=TEXT_DARK)
# VS circle
add_rect(s, 6.0, 3.8, 0.9, 0.9, ACCENT_GOLD)
add_text(s, "VS", 6.0, 3.8, 0.9, 0.9,
size=20, bold=True, color=DARK_BLUE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 9, TOTAL)
# ─────────────────────────────────────────────────────────────────
# SLIDE 10 – Summary & Key Takeaways
# ─────────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
bg(s, DARK_BLUE)
add_rect(s, 0, 0, 13.333, 1.1, RGBColor(0x08, 0x1E, 0x40))
add_rect(s, 0, 1.1, 13.333, 0.07, ACCENT_GOLD)
add_text(s, "Key Takeaways: Tanaka Index in CT of Incisional Hernia",
0.35, 0.08, 12.5, 0.92,
size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE)
takeaways = [
("1", "The Tanaka Index = HSV ÷ ACV, calculated from CT using the ellipsoid formula: V = 0.52 × a × b × c", MID_BLUE),
("2", "TI > 0.25 defines Loss of Domain — viscera cannot be safely reduced without risking abdominal compartment syndrome", RED),
("3", "ACV posterior boundary = TRANSVERSE PROCESSES; anterior boundary = healthy muscle line; cranial = diaphragm; caudal = coccyx", ORANGE),
("4", "HSV posterior boundary = SAME as ACV (transverse processes); all other limits = parietal peritoneum of the sac", GREEN),
("5", "Always use the MAXIMUM diameter from any CT slice - never average; CT with Valsalva maneuver is preferred", ACCENT_GOLD),
("6", "TI grades guide surgery: <0.25 standard repair | 0.25-0.30 TAR | 0.31-0.35 TAR+flap | >0.35 Botox+PPP then TAR", MID_BLUE),
]
for i, (num, text, color) in enumerate(takeaways):
y = 1.35 + i * 0.98
add_rect(s, 0.3, y, 0.6, 0.75, color)
add_text(s, num, 0.3, y, 0.6, 0.75,
size=20, bold=True, color=WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
add_rect(s, 1.05, y, 11.9, 0.75, RGBColor(0x15, 0x3A, 0x65))
add_text(s, text, 1.15, y + 0.05, 11.7, 0.65,
size=13.5, color=WHITE, wrap=True, valign=MSO_ANCHOR.MIDDLE)
# Footer
add_rect(s, 0, 7.1, 13.333, 0.4, RGBColor(0x08, 0x1E, 0x40))
add_text(s, "Reference: Tanaka EY et al. Hernia 2010; 14:63-69 | Images: ECR 2025 Poster",
0.3, 7.1, 12.7, 0.4,
size=11, italic=True,
color=RGBColor(0xAA, 0xBB, 0xCC), align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE)
slide_number(s, 10, TOTAL)
# ── Save ──────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/tanaka-pptx/Tanaka_Index_CT_Incisional_Hernia.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out} ({len(buf.getvalue())//1024} KB)")
cd /tmp/workspace/tanaka-pptx && python build_pptx.py
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/tanaka-pptx/Tanaka_Index_CT_Incisional_Hernia.pptx') print(f'Slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [s.text_frame.text[:60] for s in slide.shapes if s.has_text_frame and s.text_frame.text.strip()] print(f' Slide {i}: {texts[0] if texts else \"(no text)\"}') "
Tanaka Index CT Incisional Hernia
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title slide - Tanaka Index, CT Assessment of Incisional Hernia |
| 2 | What is Loss of Domain? - definition + clinical consequences |
| 3 | The Tanaka Formula - TI = HSV/ACV, ellipsoid formula, threshold |
| 4 | CT Landmarks for ACV - all 5 boundaries with diagram |
| 5 | CT Landmarks for HSV - all 5 boundaries + step-by-step measurement |
| 6 | CT Case 1 (real image) - Moderate hernia, TI = 0.11, no LOD |
| 7 | CT Case 2 (real image) - Massive LOD, TI = 1.12 |
| 8 | Grading table - TI <0.25 / 0.25-0.30 / 0.31-0.35 / >0.35 with surgical approach |
| 9 | Tanaka vs. Sabbagh method comparison |
| 10 | Key Takeaways - 6 clinical pearls |
why HCV posterior limit same as ACV?
[Spine] ← ACV posterior limit
|
| ← This zone would be counted in BOTH ACV and HSV
|
[Defect neck]
|
[Hernia sac content]
TRANSVERSE PROCESS LINE (shared posterior limit)
|
←─── ACV ───→ | ←── HSV ──→
(residual cavity)| (sac space)
|
NO OVERLAP. Clean split.
The HSV posterior limit = ACV posterior limit because the hernia sac is simply an extension of the same peritoneal cavity - using one shared posterior boundary prevents the retroperitoneal space from being double-counted in both volumes, keeping the ratio mathematically valid.
Why in case 1 HCV ap diameter in posterior boundary is not same as ASV
| Measurement | Value | Plane | Color |
|---|---|---|---|
| ACV transverse (B) | 17.9 cm | Axial (top left) | Pink - anterior-posterior direction |
| ACV AP (C) | 29.7 cm | Axial (bottom left) | Pink - horizontal arrow |
| ACV cranio-caudal (A) | 34.2 cm | Sagittal (right panel) | Pink |
| HSV cranio-caudal (a) | 15.1 cm | Sagittal (middle) | Green |
| HSV AP (c) | 6.5 cm | Sagittal (middle) | Green |
| HSV transverse (b) | 20.5 cm | Axial (bottom middle) | Green |
AXIAL VIEW (cross-section at level of hernia):
←────────── 29.7 cm (ACV AP) ──────────→
[Spine] ←──────────────────────────────→ [Anterior abdominal wall muscle line]
↑
This is the FULL depth of the
abdominal cavity at that level
←─ 6.5 cm (HSV AP) ─→
[Posterior sac wall]←→[Anterior sac wall]
(only the sac (small, herniated
protrusion) through defect)
The shared posterior boundary rule does NOT mean the two AP measurements will be equal. It means both measurements start from the same posterior reference line (transverse processes). But the HSV AP is always shorter than the ACV AP in most hernias, because the hernia sac only projects a limited distance anteriorly from its neck - not the full depth of the abdomen.