I have to submit and present this case report make proper eye catching and good poster of this case report for submission and presentation in HD quality
python3 -c " from docx import Document doc = Document('/tmp/workspace/attachments/7c4c2510-d0a2-4490-be01-b1a63306cd83/Retroperitoneal Fetus in Fetu in a 10.docx') for p in doc.paragraphs: style = p.style.name if p.style else 'None' if p.text.strip(): print(f'[{style}] {p.text}') "
mkdir -p /tmp/workspace/fif-poster && ls /tmp/workspace/fif-poster/
~/fif-poster/create_poster.py
#!/usr/bin/env python3
"""
HD Academic Conference Poster
Retroperitoneal Fetus in Fetu in a 10-Year-Old Boy
A0 landscape at 150 DPI = 4964 x 3508 px
"""
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
from matplotlib.gridspec import GridSpec
import numpy as np
from PIL import Image, ImageDraw, ImageFont
import textwrap
# ── Colour palette ────────────────────────────────────────────────────────────
DEEP_NAVY = "#0A1628"
MID_NAVY = "#1A2E4A"
ACCENT_TEAL = "#00B4D8"
ACCENT_GOLD = "#F4A261"
ACCENT_GREEN = "#2EC4B6"
LIGHT_BG = "#EEF2F7"
CARD_BG = "#FFFFFF"
TEXT_DARK = "#0A1628"
TEXT_MED = "#2D3E50"
TEXT_LIGHT = "#F0F4F8"
HEADER_LINE = "#00B4D8"
DIVIDER = "#CBD5E1"
# ── Figure size: A0 landscape 150 DPI ─────────────────────────────────────────
DPI = 150
W_IN, H_IN = 46.8/2.54, 33.1/2.54 # A0 in inches (1189 x 841 mm)
fig = plt.figure(figsize=(W_IN, H_IN), dpi=DPI, facecolor=DEEP_NAVY)
# ══════════════════════════════════════════════════════════════════════════════
# BANNER ─────────────────────────────────────────────────────────────────────
# ══════════════════════════════════════════════════════════════════════════════
BANNER_H = 0.115 # fraction of figure height
ax_banner = fig.add_axes([0, 1 - BANNER_H, 1, BANNER_H])
ax_banner.set_xlim(0, 1); ax_banner.set_ylim(0, 1)
ax_banner.axis('off')
# Gradient background via multiple rectangles
for i in range(200):
x = i / 200
r1, g1, b1 = 0x0A/255, 0x16/255, 0x28/255
r2, g2, b2 = 0x1A/255, 0x2E/255, 0x4A/255
r = r1 + (r2-r1)*x; g = g1 + (g2-g1)*x; b = b1 + (b2-b1)*x
ax_banner.axvspan(x, x+1/200, color=(r, g, b), zorder=0)
# Teal accent stripe at top
ax_banner.add_patch(plt.Rectangle((0, 0.92), 1, 0.08, color=ACCENT_TEAL, zorder=1))
# Gold accent stripe
ax_banner.add_patch(plt.Rectangle((0, 0.88), 1, 0.04, color=ACCENT_GOLD, zorder=1))
# Decorative circles
for cx, cy, rad, alpha in [(0.01, 0.5, 0.35, 0.15), (0.99, 0.5, 0.35, 0.15),
(0.5, 0.5, 0.6, 0.06)]:
circ = plt.Circle((cx, cy), rad, color=ACCENT_TEAL, alpha=alpha, zorder=1)
ax_banner.add_patch(circ)
# TITLE
ax_banner.text(0.5, 0.58, "Retroperitoneal Fetus in Fetu in a 10-Year-Old Boy",
ha='center', va='center', fontsize=32, fontweight='bold',
color='white', zorder=5,
fontfamily='DejaVu Sans')
# Subtitle
ax_banner.text(0.5, 0.28, "A Rare Case Report | Pediatric Surgery",
ha='center', va='center', fontsize=17, color=ACCENT_TEAL,
fontstyle='italic', zorder=5)
# Left badge
ax_banner.text(0.01, 0.58, "CASE\nREPORT", ha='left', va='center',
fontsize=14, fontweight='bold', color=ACCENT_GOLD, zorder=5,
fontfamily='DejaVu Sans')
# Right badge
ax_banner.text(0.99, 0.58, "PEDIATRIC\nSURGERY", ha='right', va='center',
fontsize=14, fontweight='bold', color=ACCENT_GOLD, zorder=5)
# ══════════════════════════════════════════════════════════════════════════════
# BODY ───────────────────────────────────────────────────────────────────────
# ══════════════════════════════════════════════════════════════════════════════
BODY_TOP = 0.0
BODY_H = 1 - BANNER_H
ax_bg = fig.add_axes([0, BODY_TOP, 1, BODY_H])
ax_bg.set_xlim(0, 1); ax_bg.set_ylim(0, 1)
ax_bg.axis('off')
ax_bg.set_facecolor(LIGHT_BG)
# Light diagonal watermark lines
for y0 in np.arange(-1, 2, 0.08):
ax_bg.plot([0, 1], [y0, y0+1], color=ACCENT_TEAL, alpha=0.03, lw=1.5)
# ── Helper to draw a section card ─────────────────────────────────────────────
def draw_card(ax, x, y, w, h, title, body_lines, accent=ACCENT_TEAL,
title_size=13, body_size=9.5, icon=""):
"""Draw a rounded-corner card with a coloured header strip."""
pad = 0.005
# shadow
ax.add_patch(FancyBboxPatch((x+pad, y-h-pad), w, h,
boxstyle="round,pad=0.005",
facecolor='#00000022', edgecolor='none', zorder=2))
# white card
ax.add_patch(FancyBboxPatch((x, y-h), w, h,
boxstyle="round,pad=0.005",
facecolor=CARD_BG, edgecolor=DIVIDER,
linewidth=1.0, zorder=3))
# header bar
header_h = h * 0.16
ax.add_patch(FancyBboxPatch((x, y-header_h), w, header_h,
boxstyle="round,pad=0.005",
facecolor=accent, edgecolor='none', zorder=4))
# Left accent edge
ax.add_patch(plt.Rectangle((x, y-h), 0.006, h,
facecolor=accent, zorder=4))
# Title text
title_txt = (icon + " " + title) if icon else title
ax.text(x + 0.015, y - header_h*0.5, title_txt,
fontsize=title_size, fontweight='bold', color='white',
va='center', ha='left', zorder=5)
# Body text
if isinstance(body_lines, str):
body_lines = [body_lines]
full_text = "\n".join(body_lines)
ax.text(x + 0.012, y - header_h - 0.012, full_text,
fontsize=body_size, color=TEXT_DARK, va='top', ha='left',
wrap=True, zorder=5,
linespacing=1.45,
multialignment='left')
# ── Column layout: 3 columns ──────────────────────────────────────────────────
PAD = 0.012
COL_W = (1 - 4*PAD) / 3
C1 = PAD
C2 = PAD*2 + COL_W
C3 = PAD*3 + COL_W*2
# Row y positions (from top of body area = 1.0 down to 0.0)
TOP = 0.97
# ══════════════════ COLUMN 1 ══════════════════════════════════════════════════
# — Background ————————————————
bg_lines = [
"Fetus in fetu (FIF) is an extremely rare congenital anomaly in which",
"a malformed parasitic twin is enclosed within the host body.",
"",
"• Estimated incidence: ~1 in 500,000 live births",
"• Fewer than 200 cases reported in the literature",
"• ~80% are intra-abdominal / retroperitoneal",
"• Most cases present in infancy or early childhood",
"",
"Key diagnostic challenge: Distinguishing FIF from mature teratoma",
"or fetiform teratoma, as teratoma carries malignant potential.",
]
draw_card(ax_bg, C1, TOP, COL_W, 0.29, "Background", bg_lines,
accent=ACCENT_TEAL, body_size=9.8, icon="📋")
# — Patient presentation ———————
pres_lines = [
"Patient: Usman, a 10-year-old male",
"",
"Chief Complaints (10-day history):",
" • Abdominal pain (left hypochondrium)",
" • Fever",
" • Unintentional weight loss",
"",
"No nausea, vomiting, constipation, or bowel obstruction.",
"",
"Vitals: HR 98 bpm, hemodynamically stable",
"Exam: Left-sided tenderness, no peritonitis",
"",
"Labs:",
" • Hb 11.9 g/dL | TLC 8.8 × 10⁹/L | Plt 372 × 10⁹/L",
" • Serum AFP & β-hCG: NORMAL",
" • Viral markers: Negative",
]
draw_card(ax_bg, C1, TOP-0.31, COL_W, 0.31, "Case Presentation", pres_lines,
accent=ACCENT_GOLD, body_size=9.5, icon="👦")
# — Imaging ————————————————————
img_lines = [
"Ultrasonography:",
" → Left hypochondrial mass + retrograde small-bowel dilatation",
"",
"Contrast-Enhanced CT (definitive characterisation):",
" → 10.0 × 11.0 × 14.0 cm well-defined heterogeneous mass",
" → Location: Left upper abdominal mesentery, anterior to left kidney",
" → Contents: Macroscopic fat + calcified tooth-like & osseous elements",
" → Max attenuation: 1450 HU (dental elements)",
" → Adjacent jejunal loops: displaced but NOT obstructed",
" → No ascites, lymphadenopathy, or distant disease",
"",
"Preoperative Diagnosis: Mature teratoma (radiological)",
]
draw_card(ax_bg, C1, TOP-0.64, COL_W, 0.30, "Imaging Findings", img_lines,
accent="#8B5CF6", body_size=9.5, icon="🔬")
# ══════════════════ COLUMN 2 ══════════════════════════════════════════════════
# — Visual infographic: timeline ————————————————
ax_vis = fig.add_axes([C2, BODY_TOP + BODY_H*(1-TOP) + 0.005,
COL_W, BODY_H*0.28])
ax_vis.set_xlim(0, 10); ax_vis.set_ylim(0, 6)
ax_vis.axis('off')
ax_vis.set_facecolor(CARD_BG)
# Card border
ax_vis.add_patch(FancyBboxPatch((0.05, 0.1), 9.9, 5.8,
boxstyle="round,pad=0.1",
facecolor=CARD_BG, edgecolor=DIVIDER,
linewidth=1.5, zorder=1, clip_on=False))
ax_vis.add_patch(plt.Rectangle((0.05, 5.0), 9.9, 0.9,
facecolor=ACCENT_GREEN, zorder=2, clip_on=False))
ax_vis.text(5, 5.45, "🏥 Clinical Timeline", ha='center', va='center',
fontsize=13, fontweight='bold', color='white', zorder=3)
# Timeline
steps = [
("10 days\nSymptoms", ACCENT_GOLD, 1.2),
("ED\nPresentation", ACCENT_TEAL, 2.8),
("USG +\nCECT", "#8B5CF6", 4.4),
("Laparotomy", "#EF4444", 6.0),
("Complete\nExcision", ACCENT_GREEN, 7.6),
("Uneventful\nRecovery", ACCENT_GOLD, 9.2),
]
# Arrow line
ax_vis.annotate("", xy=(9.0, 3.2), xytext=(0.8, 3.2),
arrowprops=dict(arrowstyle="-|>", color=DIVIDER, lw=2))
for label, col, xpos in steps:
ax_vis.add_patch(plt.Circle((xpos, 3.2), 0.38, color=col, zorder=4))
ax_vis.text(xpos, 3.2, str(steps.index((label, col, xpos))+1),
ha='center', va='center', fontsize=10, fontweight='bold',
color='white', zorder=5)
ax_vis.text(xpos, 2.4, label, ha='center', va='top', fontsize=7.5,
color=TEXT_DARK, zorder=5, multialignment='center')
ax_vis.add_patch(plt.Rectangle((0.05, 0.1), 0.35, 4.9,
facecolor=ACCENT_GREEN, zorder=2, clip_on=False))
# — Intraoperative ————————————————
intra_lines = [
"Operative Approach: Exploratory laparotomy",
"",
"Intraoperative Findings:",
" • Huge encapsulated retroperitoneal mass - left hypochondrium",
" • Highly vascular, adherent to major blood vessels",
" • Small bowel displaced to the RIGHT (no obstruction)",
"",
"Contents of the Lesion:",
" ★ Malformed fetiform structure",
" ★ Identifiable LIMBS",
" ★ HAIR and NAILS",
" ★ Organised fetal parts within an enclosing sac",
"",
"Management: Complete en bloc excision achieved successfully",
"Outcome: Uneventful postoperative recovery",
]
draw_card(ax_bg, C2, TOP-0.31, COL_W, 0.31, "Intraoperative Findings & Outcome",
intra_lines, accent="#EF4444", body_size=9.5, icon="🔧")
# — Key diagnostic criteria ————————————————
dx_lines = [
"Features FAVOURING Fetus in Fetu:",
" ✔ Vertebral / axial skeletal axis",
" ✔ Recognisable limbs or organs",
" ✔ Enclosing sac / membrane",
" ✔ Vascular pedicle",
" ✔ Organised fetal parts",
"",
"Features FAVOURING Teratoma:",
" ✖ Disorganised tissues without axial skeleton",
" ✖ Elevated AFP / β-hCG",
" ✖ Malignant histological transformation",
"",
"In this case: Normal tumour markers + organised fetiform",
" parts at surgery → confirmed FIF",
]
draw_card(ax_bg, C2, TOP-0.64, COL_W, 0.30, "Diagnostic Criteria: FIF vs Teratoma",
dx_lines, accent=ACCENT_TEAL, body_size=9.4, icon="⚖️")
# ══════════════════ COLUMN 3 ══════════════════════════════════════════════════
# — Discussion ————————————————
disc_lines = [
"3 Notable Features of This Case:",
"",
"① ATYPICAL AGE",
" FIF typically presents before age 3. Presentation at age 10",
" is uncommon but documented in the literature.",
"",
"② IMAGING MIMICRY",
" CT appearance strongly mimicked mature teratoma — large,",
" fat-containing, densely calcified. Organised bones & limbs",
" on CT suggest FIF over teratoma.",
"",
"③ HIGH OPERATIVE RISK",
" Retroperitoneal masses commonly distort vessels and organs.",
" Literature reports 41% perioperative complication rate in",
" paediatric retroperitoneal resections.",
" → Meticulous dissection around IVC, mesenteric & renal",
" vessels required.",
]
draw_card(ax_bg, C3, TOP, COL_W, 0.29, "Discussion", disc_lines,
accent=ACCENT_GOLD, body_size=9.5, icon="💡")
# — Differential diagnosis ————————————————
diff_lines = [
"Differential Diagnosis Considered:",
"",
"1. Fetus in Fetu ← Final Diagnosis",
" Organised fetiform parts, normal tumour markers",
"",
"2. Mature Retroperitoneal Teratoma",
" Fat, calcification, teeth on imaging — benign but",
" carries malignant potential (somatic transformation)",
"",
"3. Fetiform Teratoma",
" Human-like structures WITHOUT a clearly developed",
" axial skeleton — borderline/subjective distinction",
"",
"4. Germ-Cell Malignancy",
" Excluded by normal AFP, β-hCG, and imaging profile",
]
draw_card(ax_bg, C3, TOP-0.31, COL_W, 0.31, "Differential Diagnosis", diff_lines,
accent="#8B5CF6", body_size=9.4, icon="🧬")
# — Conclusion + Key messages ————————————————
conc_lines = [
"Key Takeaways:",
"",
"• FIF in a 10-year-old = atypical, late presentation",
"• CT is essential for characterisation & operative planning",
"• Imaging alone cannot reliably separate FIF from teratoma",
"• Final diagnosis requires surgical + histopathological confirmation",
"• Complete excision = definitive treatment for both entities",
"• Long-term follow-up mandatory to exclude malignant transformation",
"",
"Management Principle:",
" Exploratory laparotomy → complete en bloc excision →",
" postoperative surveillance with AFP, β-hCG & imaging",
]
draw_card(ax_bg, C3, TOP-0.64, COL_W, 0.30, "Conclusion & Key Messages", conc_lines,
accent=ACCENT_GREEN, body_size=9.6, icon="✅")
# ── Statistics bar ────────────────────────────────────────────────────────────
STATS_Y = 0.025
STATS_H = 0.065
ax_stats = fig.add_axes([PAD, BODY_TOP + BODY_H*(STATS_Y),
1-2*PAD, BODY_H*(STATS_H)])
ax_stats.set_xlim(0, 1); ax_stats.set_ylim(0, 1)
ax_stats.axis('off')
ax_stats.add_patch(FancyBboxPatch((0, 0), 1, 1,
boxstyle="round,pad=0.01",
facecolor=MID_NAVY, edgecolor=ACCENT_TEAL,
linewidth=1.5))
stats = [
("<200", "Cases Reported\nWorldwide"),
("1:500,000", "Estimated\nIncidence"),
("~80%", "Intra-abdominal\nLocation"),
("10 yrs", "Patient Age\n(Atypical)"),
("10×11×14 cm", "Mass Size\non CT"),
("Normal", "AFP & β-hCG\nTumour Markers"),
("100%", "Complete\nExcision"),
("0", "Perioperative\nComplications"),
]
sw = 1 / len(stats)
for i, (val, label) in enumerate(stats):
cx = (i + 0.5) * sw
ax_stats.text(cx, 0.65, val, ha='center', va='center',
fontsize=13.5, fontweight='bold', color=ACCENT_GOLD)
ax_stats.text(cx, 0.22, label, ha='center', va='center',
fontsize=7.5, color=TEXT_LIGHT, multialignment='center',
linespacing=1.3)
if i > 0:
ax_stats.axvline(x=i*sw, color=ACCENT_TEAL, alpha=0.35, lw=1)
# ── Footer ────────────────────────────────────────────────────────────────────
ax_foot = fig.add_axes([0, 0, 1, BODY_H * STATS_Y])
ax_foot.set_xlim(0, 1); ax_foot.set_ylim(0, 1)
ax_foot.axis('off')
ax_foot.set_facecolor(DEEP_NAVY)
ax_foot.add_patch(plt.Rectangle((0, 0.85), 1, 0.15, color=ACCENT_TEAL))
ax_foot.text(0.5, 0.42,
"Correspondence: Case reported from Paediatric Surgery Department | "
"Informed consent obtained | No conflicts of interest | No external funding",
ha='center', va='center', fontsize=8, color='#94A3B8')
ax_foot.text(0.02, 0.42, "Case Report 2024-2025", ha='left', va='center',
fontsize=8, color=ACCENT_TEAL, style='italic')
ax_foot.text(0.98, 0.42, "Pediatric Surgery · Retroperitoneal Mass · FIF",
ha='right', va='center', fontsize=8, color=ACCENT_GOLD)
# ── Save ──────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/fif-poster/FIF_Case_Report_Poster.png"
fig.savefig(out, dpi=DPI, bbox_inches='tight', facecolor=DEEP_NAVY,
pad_inches=0.05)
print(f"Saved → {out}")
print(f"Size: {fig.get_size_inches()} inches @ {DPI} DPI")
w_px = int(fig.get_size_inches()[0] * DPI)
h_px = int(fig.get_size_inches()[1] * DPI)
print(f"Resolution: {w_px} x {h_px} px")
plt.close()
cd /tmp/workspace/fif-poster && python3 create_poster.py 2>&1
~/fif-poster/create_poster.py
Error: String not found in file: 'draw_card(ax_bg, C1, TOP, COL_W, 0.29, "Background", bg_lines,
accent=ACCENT_TEAL, body_size=9.8, icon="📋")
# — Patient presentation ———————
pres_lines = [
"Patient: Usman, a 10-year-old male",
"",
"Chief Complaints (10-day history):",
" • Abdominal pain (left hypochondrium)",
" • Fever",
" • Unintentional weight loss",
"",
"No nausea, vomiting, constipation, or bowel obstruction.",
"",
"Vitals: HR 98 bpm, hemodynamically stable",
"Exam: Left-sided tenderness, no peritonitis",
"",
"Labs:",
" • Hb 11.9 g/dL | TLC 8.8 × 10⁹/L | Plt 372 × 10⁹/L",
" • Serum AFP & β-hCG: NORMAL",
" • Viral markers: Negative",
]
draw_card(ax_bg, C1, TOP-0.31, COL_W, 0.31, "Case Presentation", pres_lines,
accent=ACCENT_GOLD, body_size=9.5, icon="👦")
# — Imaging ————————————————————
img_lines = [
"Ultrasonography:",
" -> Left hypochondrial mass + retrograde small-bowel dilatation",
"",
"Contrast-Enhanced CT (definitive characterisation):",
" -> 10.0 × 11.0 × 14.0 cm well-defined heterogeneous mass",
" -> Location: Left upper abdominal mesentery, anterior to left kidney",
" -> Contents: Macroscopic fat + calcified tooth-like & osseous elements",
" -> Max attenuation: 1450 HU (dental elements)",
" -> Adjacent jejunal loops: displaced but NOT obstructed",
" -> No ascites, lymphadenopathy, or distant disease",
"",
"Preoperative Diagnosis: Mature teratoma (radiological)",
]
draw_card(ax_bg, C1, TOP-0.64, COL_W, 0.30, "Imaging Findings", img_lines,
accent="#8B5CF6", body_size=9.5, icon="🔬")'~/fif-poster/create_poster_v2.py
#!/usr/bin/env python3
"""
HD Academic Conference Poster - v2 (no emoji, 200 DPI, A0 landscape)
Retroperitoneal Fetus in Fetu in a 10-Year-Old Boy
"""
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch
from matplotlib.gridspec import GridSpec
import numpy as np
# ── Colour palette ────────────────────────────────────────────────────────────
DEEP_NAVY = "#0A1628"
MID_NAVY = "#1A2E4A"
ACCENT_TEAL = "#00B4D8"
ACCENT_GOLD = "#E8A020"
ACCENT_GREEN = "#2EC4B6"
ACCENT_PURP = "#7C3AED"
ACCENT_RED = "#DC2626"
LIGHT_BG = "#EEF2F7"
CARD_BG = "#FFFFFF"
TEXT_DARK = "#0D1B2A"
TEXT_MED = "#2D3E50"
TEXT_LIGHT = "#F0F4F8"
DIVIDER = "#CBD5E1"
# ── Figure: A0 landscape at 200 DPI ─────────────────────────────────────────
DPI = 200
W_IN = 46.8 / 2.54 # 1189 mm -> 46.8 in
H_IN = 33.1 / 2.54 # 841 mm -> 33.1 in
fig = plt.figure(figsize=(W_IN, H_IN), dpi=DPI, facecolor=DEEP_NAVY)
# ══════════════════════════════════════════════════════════════════════════════
# TOP BANNER
# ══════════════════════════════════════════════════════════════════════════════
BANNER_H = 0.118
ax_b = fig.add_axes([0, 1 - BANNER_H, 1, BANNER_H])
ax_b.set_xlim(0, 1); ax_b.set_ylim(0, 1); ax_b.axis('off')
# Gradient fill
for i in range(300):
x = i / 300
r = 0x0A/255 + (0x12/255)*x
g = 0x16/255 + (0x18/255)*x
b = 0x28/255 + (0x1C/255)*x
ax_b.axvspan(x, x + 1/300, color=(r, g, b), zorder=0)
# Top edge accent
ax_b.add_patch(plt.Rectangle((0, 0.92), 1, 0.08, color=ACCENT_TEAL, zorder=1))
ax_b.add_patch(plt.Rectangle((0, 0.87), 1, 0.05, color=ACCENT_GOLD, zorder=1))
# Decorative circles
for cx, cy, rad, col, alpha in [
(0.0, 0.50, 0.40, ACCENT_TEAL, 0.12),
(1.0, 0.50, 0.40, ACCENT_TEAL, 0.12),
(0.5, 0.50, 0.65, ACCENT_PURP, 0.05),
(0.12, 0.50, 0.20, ACCENT_GOLD, 0.08),
(0.88, 0.50, 0.20, ACCENT_GOLD, 0.08),
]:
ax_b.add_patch(plt.Circle((cx, cy), rad, color=col, alpha=alpha, zorder=1))
# Left label box
ax_b.add_patch(FancyBboxPatch((0.005, 0.18), 0.075, 0.60,
boxstyle="round,pad=0.02",
facecolor=ACCENT_TEAL, edgecolor='none', alpha=0.85, zorder=4))
ax_b.text(0.043, 0.50, "CASE\nREPORT", ha='center', va='center',
fontsize=14, fontweight='bold', color='white', zorder=5)
# Right label box
ax_b.add_patch(FancyBboxPatch((0.920, 0.18), 0.075, 0.60,
boxstyle="round,pad=0.02",
facecolor=ACCENT_GOLD, edgecolor='none', alpha=0.85, zorder=4))
ax_b.text(0.958, 0.50, "PAED.\nSURGERY", ha='center', va='center',
fontsize=12, fontweight='bold', color=DEEP_NAVY, zorder=5)
# Main title
ax_b.text(0.500, 0.60,
"Retroperitoneal Fetus in Fetu in a 10-Year-Old Boy",
ha='center', va='center', fontsize=34, fontweight='bold',
color='white', zorder=5)
# Subtitle
ax_b.text(0.500, 0.26,
"A Rare Case Report | Paediatric Surgery | Retroperitoneal Mass",
ha='center', va='center', fontsize=16, color=ACCENT_TEAL,
style='italic', zorder=5)
# ══════════════════════════════════════════════════════════════════════════════
# BODY BACKGROUND
# ══════════════════════════════════════════════════════════════════════════════
BODY_H = 1 - BANNER_H
ax_bg = fig.add_axes([0, 0, 1, BODY_H])
ax_bg.set_xlim(0, 1); ax_bg.set_ylim(0, 1); ax_bg.axis('off')
ax_bg.set_facecolor(LIGHT_BG)
# Subtle diagonal pattern
for y0 in np.arange(-1, 2, 0.06):
ax_bg.plot([0, 1], [y0, y0+1], color=ACCENT_TEAL, alpha=0.025, lw=1)
# ── Card helper ───────────────────────────────────────────────────────────────
def card(ax, x, y, w, h, title, lines, accent=ACCENT_TEAL,
title_fs=13.5, body_fs=9.8):
pad = 0.004
# Drop shadow
ax.add_patch(FancyBboxPatch((x+pad, y-h-pad), w, h,
boxstyle="round,pad=0.006",
facecolor='#00000028', edgecolor='none', zorder=2))
# White card
ax.add_patch(FancyBboxPatch((x, y-h), w, h,
boxstyle="round,pad=0.006",
facecolor=CARD_BG, edgecolor=DIVIDER,
linewidth=1.2, zorder=3))
# Header bar
hdr = h * 0.165
ax.add_patch(FancyBboxPatch((x, y-hdr), w, hdr,
boxstyle="round,pad=0.006",
facecolor=accent, edgecolor='none', zorder=4))
# Left accent stripe
ax.add_patch(plt.Rectangle((x, y-h), 0.007, h,
facecolor=accent, zorder=4))
# Title
ax.text(x + 0.016, y - hdr*0.50, title,
fontsize=title_fs, fontweight='bold', color='white',
va='center', ha='left', zorder=5)
# Body
if isinstance(lines, str):
lines = [lines]
ax.text(x + 0.014, y - hdr - 0.013,
"\n".join(lines),
fontsize=body_fs, color=TEXT_DARK, va='top', ha='left',
zorder=5, linespacing=1.48, multialignment='left')
# ── Layout constants ──────────────────────────────────────────────────────────
PAD = 0.013
COL_W = (1 - 4*PAD) / 3
C1 = PAD
C2 = 2*PAD + COL_W
C3 = 3*PAD + 2*COL_W
TOP = 0.970 # from top of body area (1.0 = top edge under banner)
# ══════════════════════════════════════════════════════════════════════════════
# COLUMN 1
# ══════════════════════════════════════════════════════════════════════════════
# Background
card(ax_bg, C1, TOP, COL_W, 0.285,
"BACKGROUND",
["Fetus in fetu (FIF) is an extremely rare congenital anomaly in which",
"a malformed parasitic twin is enclosed within the host body.",
"",
" * Estimated incidence: ~1 in 500,000 live births",
" * Literature reports: <200 cases worldwide",
" * Location: ~80% intra-abdominal / retroperitoneal",
" * Typical age at Dx: Infancy or early childhood",
"",
"FIF must be distinguished from mature teratoma / fetiform",
"teratoma because teratoma carries malignant potential.",
"",
"Complete surgical excision is the standard treatment for",
"symptom relief and definitive histopathological diagnosis."],
accent=ACCENT_TEAL)
# Case Presentation
card(ax_bg, C1, TOP-0.298, COL_W, 0.300,
"CASE PRESENTATION",
["Patient: Usman, 10-year-old male",
"",
"Presenting Complaints (10-day history):",
" -> Abdominal pain (left hypochondrium)",
" -> Fever",
" -> Unintentional weight loss",
"",
"Vitals: HR 98 bpm | Haemodynamically STABLE",
"Examination: Left-sided tenderness, no peritonitis",
"",
"Laboratory Investigations:",
" Hb 11.9 g/dL | TLC 8.8 x10^9/L | Plt 372 x10^9/L",
"",
" Serum AFP: NORMAL Serum b-hCG: NORMAL",
" Viral markers: NEGATIVE",
"",
"No nausea, vomiting, bowel obstruction, or distension."],
accent=ACCENT_GOLD)
# Imaging
card(ax_bg, C1, TOP-0.612, COL_W, 0.305,
"IMAGING FINDINGS",
["Ultrasonography:",
" >> Left hypochondrial mass with retrograde small-bowel dilatation",
"",
"Contrast-Enhanced CT (definitive characterisation):",
" >> Size: 10.0 x 11.0 x 14.0 cm",
" >> Location: Left upper abdominal mesentery,",
" anterior to left kidney",
" >> Content: Macroscopic fat + calcified tooth-like",
" & osseous elements (up to 1450 HU)",
" >> Bowel: Adjacent jejunal loops DISPLACED, not obstructed",
" >> No ascites, lymphadenopathy or distant disease",
"",
"Pre-operative Diagnosis: Mature Teratoma (radiological)"],
accent=ACCENT_PURP)
# ══════════════════════════════════════════════════════════════════════════════
# COLUMN 2 - Timeline + Intraop + Diagnostic Criteria
# ══════════════════════════════════════════════════════════════════════════════
# ── Timeline infographic ──────────────────────────────────────────────────────
TL_W = COL_W
TL_H = 0.26
TL_X = C2
TL_Y = TOP # top-left corner of box (in ax_bg coords)
# Card shell
ax_bg.add_patch(FancyBboxPatch((TL_X+0.004, TL_Y-TL_H-0.004), TL_W, TL_H,
boxstyle="round,pad=0.006",
facecolor='#00000028', edgecolor='none', zorder=2))
ax_bg.add_patch(FancyBboxPatch((TL_X, TL_Y-TL_H), TL_W, TL_H,
boxstyle="round,pad=0.006",
facecolor=CARD_BG, edgecolor=DIVIDER,
linewidth=1.2, zorder=3))
# Header
ax_bg.add_patch(FancyBboxPatch((TL_X, TL_Y-TL_H*0.165), TL_W, TL_H*0.165,
boxstyle="round,pad=0.006",
facecolor=ACCENT_GREEN, edgecolor='none', zorder=4))
ax_bg.add_patch(plt.Rectangle((TL_X, TL_Y-TL_H), 0.007, TL_H,
facecolor=ACCENT_GREEN, zorder=4))
ax_bg.text(TL_X+0.016, TL_Y - TL_H*0.165*0.50,
"CLINICAL TIMELINE",
fontsize=13.5, fontweight='bold', color='white',
va='center', ha='left', zorder=5)
# Steps
steps = [
("10-Day\nSymptoms", ACCENT_GOLD, "1"),
("ED\nArrival", ACCENT_TEAL, "2"),
("USG +\nCECT", ACCENT_PURP, "3"),
("Laparo-\ntomy", ACCENT_RED, "4"),
("En Bloc\nExcision", ACCENT_GREEN, "5"),
("Uneventful\nRecovery", ACCENT_GOLD,"6"),
]
n = len(steps)
xs = [TL_X + TL_W * (i + 0.5) / n for i in range(n)]
LINE_Y = TL_Y - TL_H * 0.58
CIRC_R = TL_H * 0.11
LABEL_Y = LINE_Y - CIRC_R - 0.025
# Connector line
ax_bg.plot([xs[0], xs[-1]], [LINE_Y, LINE_Y], color=DIVIDER, lw=2, zorder=3)
for xi, (label, col, num) in zip(xs, steps):
ax_bg.add_patch(plt.Circle((xi, LINE_Y), CIRC_R,
color=col, zorder=5, clip_on=False))
ax_bg.text(xi, LINE_Y, num, ha='center', va='center',
fontsize=11, fontweight='bold', color='white', zorder=6)
ax_bg.text(xi, LABEL_Y, label, ha='center', va='top',
fontsize=8.5, color=TEXT_DARK, multialignment='center',
linespacing=1.3, zorder=5)
# Intraoperative
card(ax_bg, C2, TOP-0.272, COL_W, 0.308,
"INTRAOPERATIVE FINDINGS & OUTCOME",
["Approach: Exploratory Laparotomy",
"",
"Findings:",
" -> Huge encapsulated retroperitoneal mass (left hypochondrium)",
" -> Highly vascular, adherent to major blood vessels",
" -> Small bowel displaced to the RIGHT (no obstruction)",
"",
"Contents of the Lesion:",
" [*] Malformed FETIFORM structure",
" [*] Identifiable LIMBS",
" [*] HAIR and NAILS present",
" [*] Organised fetal parts within an enclosing sac",
"",
"Treatment: Complete en bloc excision - SUCCESSFUL",
"Outcome: Uneventful postoperative recovery"],
accent=ACCENT_RED)
# Diagnostic criteria
card(ax_bg, C2, TOP-0.595, COL_W, 0.310,
"DIAGNOSTIC CRITERIA: FIF vs TERATOMA",
["Features FAVOURING Fetus in Fetu:",
" (+) Vertebral / axial skeletal axis",
" (+) Recognisable limbs or organs",
" (+) Enclosing sac / membrane",
" (+) Vascular pedicle",
" (+) Organised fetal parts",
"",
"Features FAVOURING Teratoma:",
" (-) Disorganised tissues without axial skeleton",
" (-) Elevated AFP or b-hCG",
" (-) Malignant histological transformation",
"",
"THIS CASE: Normal tumour markers + organised fetiform",
" parts at surgery => CONFIRMED FIF"],
accent=ACCENT_TEAL)
# ══════════════════════════════════════════════════════════════════════════════
# COLUMN 3
# ══════════════════════════════════════════════════════════════════════════════
card(ax_bg, C3, TOP, COL_W, 0.285,
"DISCUSSION",
["3 Notable Features of This Case:",
"",
"[1] ATYPICAL AGE OF PRESENTATION",
" FIF typically presents before age 3 years.",
" Presentation at age 10 is uncommon but has been",
" documented in the literature.",
"",
"[2] IMAGING MIMICRY OF MATURE TERATOMA",
" CT appearance was large, fat-containing, and densely",
" calcified - strongly mimicking mature teratoma.",
" Organised bones, limbs & vertebral axis favour FIF.",
"",
"[3] HIGH OPERATIVE RISK",
" Retroperitoneal masses commonly distort vessels.",
" Literature: 41% perioperative complication rate in",
" paediatric retroperitoneal resections.",
" Required meticulous dissection around IVC, mesenteric",
" and renal vessels."],
accent=ACCENT_GOLD)
card(ax_bg, C3, TOP-0.298, COL_W, 0.300,
"DIFFERENTIAL DIAGNOSIS",
["1. Fetus in Fetu <-- FINAL DIAGNOSIS",
" Organised fetiform parts, normal tumour markers",
"",
"2. Mature Retroperitoneal Teratoma",
" Fat, calcification, teeth on imaging - benign but",
" carries malignant potential (somatic transformation)",
"",
"3. Fetiform Teratoma",
" Human-like structures WITHOUT clearly developed",
" axial skeleton - borderline/subjective distinction",
"",
"4. Germ-Cell Malignancy",
" Excluded: AFP, b-hCG normal; imaging profile benign",
"",
"=> Complete excision + histopathology = definitive answer"],
accent=ACCENT_PURP)
card(ax_bg, C3, TOP-0.612, COL_W, 0.305,
"CONCLUSION & KEY MESSAGES",
["FIF in a 10-year-old = atypical, late presentation",
"",
"CT is essential for characterisation and operative planning",
"",
"Imaging alone cannot reliably separate FIF from teratoma -",
"surgical + histopathological confirmation is mandatory",
"",
"Complete en bloc excision is the definitive treatment",
"for both FIF and benign retroperitoneal teratoma",
"",
"Long-term surveillance is mandatory to exclude:",
" - Recurrence",
" - Malignant transformation (teratoma differential)",
"",
"Management pathway:",
" Laparotomy -> Complete excision -> AFP/b-hCG + Imaging",
" follow-up at regular intervals"],
accent=ACCENT_GREEN)
# ══════════════════════════════════════════════════════════════════════════════
# STATISTICS BAR
# ══════════════════════════════════════════════════════════════════════════════
STAT_Y = 0.065 # bottom of body, fraction of body height
STAT_H = 0.068
ax_s = fig.add_axes([PAD, STAT_Y * BODY_H, 1-2*PAD, STAT_H * BODY_H])
ax_s.set_xlim(0, 1); ax_s.set_ylim(0, 1); ax_s.axis('off')
ax_s.add_patch(FancyBboxPatch((0, 0), 1, 1,
boxstyle="round,pad=0.01",
facecolor=MID_NAVY, edgecolor=ACCENT_TEAL,
linewidth=1.8, zorder=1))
stats = [
("<200", "Cases Reported\nWorldwide"),
("1:500,000", "Estimated\nIncidence"),
("~80%", "Intra-abdominal\nLocation"),
("10 Years", "Patient Age\n(Atypical)"),
("10x11x14 cm", "Mass Size\non CT"),
("1450 HU", "Max CT Density\n(Dental Elements)"),
("NORMAL", "AFP & b-hCG\nTumour Markers"),
("100%", "Complete\nExcision Achieved"),
("ZERO", "Perioperative\nComplications"),
]
sw = 1 / len(stats)
for i, (val, lbl) in enumerate(stats):
cx = (i + 0.5) * sw
ax_s.text(cx, 0.67, val, ha='center', va='center',
fontsize=13, fontweight='bold', color=ACCENT_GOLD, zorder=3)
ax_s.text(cx, 0.22, lbl, ha='center', va='center',
fontsize=7.8, color=TEXT_LIGHT,
multialignment='center', linespacing=1.3, zorder=3)
if i > 0:
ax_s.axvline(x=i*sw, color=ACCENT_TEAL, alpha=0.30, lw=1.2)
# ══════════════════════════════════════════════════════════════════════════════
# FOOTER
# ══════════════════════════════════════════════════════════════════════════════
ax_f = fig.add_axes([0, 0, 1, STAT_Y * BODY_H])
ax_f.set_xlim(0, 1); ax_f.set_ylim(0, 1); ax_f.axis('off')
ax_f.set_facecolor(DEEP_NAVY)
ax_f.add_patch(plt.Rectangle((0, 0.80), 1, 0.20, color=ACCENT_TEAL, zorder=1))
ax_f.text(0.50, 0.40,
"Correspondence: Paediatric Surgery Department | Informed consent obtained |"
" No conflicts of interest | No external funding",
ha='center', va='center', fontsize=8.5, color='#94A3B8', zorder=2)
ax_f.text(0.02, 0.40, "Case Report - Retroperitoneal FIF", ha='left', va='center',
fontsize=8.5, color=ACCENT_TEAL, style='italic', zorder=2)
ax_f.text(0.98, 0.40,
"Paediatric Surgery | Retroperitoneal Mass | Rare Case",
ha='right', va='center', fontsize=8.5, color=ACCENT_GOLD, zorder=2)
# ══════════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════════
OUT = "/tmp/workspace/fif-poster/FIF_Poster_HD.png"
fig.savefig(OUT, dpi=DPI, bbox_inches='tight',
facecolor=DEEP_NAVY, pad_inches=0.05)
plt.close()
w_px = int(W_IN * DPI)
h_px = int(H_IN * DPI)
print(f"Saved: {OUT}")
print(f"Size : {W_IN:.2f} x {H_IN:.2f} inches @ {DPI} DPI = {w_px} x {h_px} px")
cd /tmp/workspace/fif-poster && python3 create_poster_v2.py 2>&1
ls -lh /tmp/workspace/fif-poster/ && python3 -c " from PIL import Image img = Image.open('/tmp/workspace/fif-poster/FIF_Poster_HD.png') print('Resolution:', img.size) print('Mode:', img.mode) print('Format:', img.format) "
FIF Poster HD
Image · PNG
| Section | Content |
|---|---|
| Banner | Deep navy gradient with teal/gold accent stripes, large bold title, "CASE REPORT" and "PAED. SURGERY" badge labels |
| Column 1 | Background, Case Presentation (patient details + labs), Imaging Findings (USG + CECT) |
| Column 2 | Clinical Timeline infographic (6-step visual flow), Intraoperative Findings, FIF vs Teratoma diagnostic criteria |
| Column 3 | Discussion (3 notable features), Differential Diagnosis, Conclusion & Key Messages |
| Stats Bar | 9 key data highlights in a dark navy strip (incidence, size, AFP/b-hCG, outcome) |
| Footer | Consent, conflict of interest, and keyword strip |