give me content to make 20 slide ppt on Anatomy and physiology of Liver including 3D 0r 4K images
gross anatomy of the liver lobes diaphragmatic and visceral surfaces
liver blood supply portal vein hepatic artery hepatic vein diagram
hepatic lobule histology microscopic anatomy central vein portal triad
biliary tree gallbladder bile duct anatomy diagram

This composite educational image illustrates the surgical management of complex biliary disease, specifically Mirizzi syndrome with a cholecystobiliary fistula. The primary anatomical diagram depicts a gallbladder densely packed with multiple small, uniform stones (cholelithiasis). The biliary tree is shown with the right and left hepatic ducts joining into the common hepatic duct, which then becomes the common bile duct (CBD). A critical feature illustrated is a cholecystobiliary fistula—an abnormal connection between the gallbladder infundibulum and the CBD. A flexible medical device, representing a choledochoscope or cholangiocatheter, is shown entering through the gallbladder infundibulum and traversing the fistula to access the CBD for stone clearance. The upper-left inset contains a diagnostic fluoroscopic image from an intraoperative cholangiogram (IOC). This radiograph confirms the biliary anatomy, showing a radiopaque cholangiocatheter with a curved configuration positioned within the ductal system to assess patency and locate impacted stones. The image serves as a pedagogical tool for understanding the transinfundibular approach in laparoscopic biliary surgery when hilar inflammation is severe.

This figure demonstrates an endoscopic retrograde cholangiopancreatography (ERCP) procedure in a patient with surgically altered gastrointestinal anatomy. Panel A is an anatomical diagram illustrating the use of a large-diameter sliding tube to navigate through a tortuous gastrojejunal anastomosis. The schematic shows a side-viewing endoscope extending through the sliding tube into the duodenum to access the biliary tree. The biliary system is depicted in green, showing the gallbladder and the common bile duct, with a small brown stone located at the distal end of the duct. Panel B is a clinical photograph representing an endoscopic view during the procedure. It shows the reddish-orange, moist mucosal lining of the gastrointestinal tract. A white tubular endoscopic instrument is visible within the lumen, positioned near a possible anatomical landmark or small polypoid lesion on the right. The image illustrates a technique for overcoming difficult endoscopic access in post-gastrectomy patients to perform therapeutic interventions such as common bile duct stone removal.
liver segments Couinaud classification anatomy

An intraoperative clinical photograph providing a detailed view of the liver surface and its anatomical segments according to the Couinaud classification. The image demonstrates the spatial relationships of the falciform ligament and ligamentum teres hepatis as they approach the umbilical fissure, effectively dividing the left lobe (segments II and III) from the right and middle sections (segments IVa, IVb, and VIII). The gallbladder is clearly visualized as a distended, bluish-gray sac positioned inferior to segments V and VI. Adjacent to the gallbladder, the pont hepatique (hepatic bridge) is identified as a parenchymal bridge of liver tissue connecting the medial and lateral segments. Roman numeral labels highlight the specific liver segments (II, III, IVa, IVb, V, VI, VII, VIII), aiding in the surgical localization of landmarks. This laparoscopic or open surgical view is essential for understanding hepatic anatomy during cholecystectomy or segmental liver resection.

This diagnostic image consists of three axial contrast-enhanced CT scans of the upper abdomen, specifically illustrating hepatic segmental anatomy. The images utilize nine numbered circular markers to identify liver segments based on the Couinaud classification system. The first (superior) slice identifies the caudate lobe (Point 1), the superior left lateral segment (Point 2), the superior left medial segment (Point 4a), and the superior right segments (Points 7 and 8). Subsequent inferior slices identify the inferior left lateral segment (Point 3), inferior left medial segment (Point 4b), and the right lobe segments (Points 5 and 6). Key anatomical landmarks are visible for orientation, including the vertebral body and spinal canal posteriorly, the kidneys, the spleen in the left upper quadrant, and the fluid-filled stomach. The liver parenchyma appears homogeneous, and major vascular structures such as the inferior vena cava and portal venous branches are discernible. This visual serves as a topographical guide for identifying functional liver segments in clinical radiology and surgical planning.

This set of axial MRI images illustrates the application of Couinaud's hepatic classification system for segmenting liver anatomy. The images use dashed yellow lines and arrows to demonstrate the five primary planes (three vertical and two horizontal) defined by vascular landmarks. Panels (a) and (b) show the line from the middle hepatic vein (MHV) to the inferior vena cava (IVC) or gallbladder fossa, separating the right and left lobes. Panels (d) and (e) depict the right hepatic vein (RHV) plane, which further divides the right lobe into anterior and posterior segments. Panels (g) and (h) demonstrate the left hepatic vein (LHV) and left longitudinal fissure, which distinguish the medial and lateral segments of the left lobe. Horizontal division into superior and inferior segments is marked by the portal vein branches (f and i). Additionally, panel (c) highlights the curved boundary of the caudate lobe (Segment I). This visualization is a critical tool for surgical planning and radiological reporting in abdominal imaging.
liver 3D anatomical illustration lobes anterior view
hepatic lobule diagram central vein hepatocytes sinusoids Kupffer cells
A clean 3D medical illustration of the human liver anatomy, anterior view, showing the right lobe, left lobe, falciform ligament, and surrounding ligaments, labeled anatomical diagram style
A 3D cutaway diagram of a hepatic lobule showing the central vein, radiating hepatocyte plates, sinusoids, and portal triad (hepatic artery, portal vein, bile duct) at the periphery, labeled medical illustration
mkdir -p /tmp/workspace/liver-ppt/assets && ls -la /tmp/workspace/
~/liver-ppt/build_deck.py
# -*- coding: utf-8 -*-
import json, subprocess, base64
from io import BytesIO
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.enum.shapes import MSO_SHAPE
# ---------- Image URLs ----------
IMAGES = {
"gross3d": "https://cdn.orris.care/image-gen/9216d66fdb6d4795809f4b4547e4621f.png",
"lobule3d": "https://cdn.orris.care/image-gen/4d554a4386ae4d8b9c44b42eeb8e2f35.png",
"couinaud": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_45a6fa584acec163c8da01a35bd343754e190559e9b8cb179e27027355888a61.jpg",
"vasculature": "https://cdn.orris.care/cdss_images/BAILY_1760532232987_78e26efb-27f6-4789-b897-ab403bcc8e36.png",
"biliary": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_5e1e73ef397d23ab37a0102e6587237012b38b6ced418995a50baf158080b687.jpg",
"lobule_hist": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4e01c93071b8a72b1a1bf83cd7adaefb89bbb37709ba0907bd9c72ac148da9fe.jpg",
"sinusoid": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3a7c30f04918f893455af17575a12432e721f45971c29c24a404f75db2119001.jpg",
"bilirubin": "https://cdn.orris.care/cdss_images/HARRISON_1763035189397_49196e4f-7d91-4ead-8e5d-e344827c67c6.png",
}
print("Downloading images...")
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py"] + list(IMAGES.values())
))
url_to_b64 = {r["url"]: r.get("base64") for r in result}
IMG_BYTES = {}
for key, url in IMAGES.items():
b64 = url_to_b64.get(url)
if b64:
if "," in b64:
b64 = b64.split(",", 1)[1]
IMG_BYTES[key] = BytesIO(base64.b64decode(b64))
else:
IMG_BYTES[key] = None
print("WARNING: failed to fetch", key, url)
# ---------- Theme ----------
DARK = RGBColor(0x2B, 0x1B, 0x12)
MAROON = RGBColor(0x7A, 0x1F, 0x2B)
GOLD = RGBColor(0xB8, 0x86, 0x2C)
CREAM = RGBColor(0xFB, 0xF6, 0xEE)
TEXTC = RGBColor(0x33, 0x2A, 0x22)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
BLANK = prs.slide_layouts[6]
SW, SH = prs.slide_width, prs.slide_height
def add_bg(slide, color=CREAM):
bg = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, SW, SH)
bg.fill.solid()
bg.fill.fore_color.rgb = color
bg.line.fill.background()
bg.shadow.inherit = False
slide.shapes._spTree.remove(bg._element)
slide.shapes._spTree.insert(2, bg._element)
return bg
def add_footer_bar(slide, n):
bar = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, SH - Inches(0.35), SW, Inches(0.35))
bar.fill.solid(); bar.fill.fore_color.rgb = MAROON; bar.line.fill.background(); bar.shadow.inherit = False
tb = slide.shapes.add_textbox(SW - Inches(1.5), SH - Inches(0.35), Inches(1.3), Inches(0.35))
tf = tb.text_frame; tf.text = f"{n:02d} / 20"
p = tf.paragraphs[0]; p.alignment = PP_ALIGN.RIGHT
r = p.runs[0]; r.font.size = Pt(11); r.font.color.rgb = WHITE
def header(slide, title, subtitle=None):
bar = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, SW, Inches(1.15))
bar.fill.solid(); bar.fill.fore_color.rgb = MAROON; bar.line.fill.background(); bar.shadow.inherit = False
accent = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, Inches(1.15), SW, Inches(0.06))
accent.fill.solid(); accent.fill.fore_color.rgb = GOLD; accent.line.fill.background(); accent.shadow.inherit = False
tb = slide.shapes.add_textbox(Inches(0.55), Inches(0.12), Inches(11.5), Inches(0.7))
tf = tb.text_frame; tf.word_wrap = True
p = tf.paragraphs[0]; p.text = title
r = p.runs[0]; r.font.size = Pt(30); r.font.bold = True; r.font.color.rgb = WHITE; r.font.name = "Calibri"
if subtitle:
p2 = tf.add_paragraph(); p2.text = subtitle
r2 = p2.runs[0]; r2.font.size = Pt(14); r2.font.italic = True; r2.font.color.rgb = RGBColor(0xF0,0xD9,0xB5)
def bullets(slide, items, left=0.55, top=1.45, width=6.6, height=5.6, size=16, bullet_color=MAROON):
tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
tf = tb.text_frame; tf.word_wrap = True
first = True
for item in items:
if isinstance(item, tuple):
text, level = item
else:
text, level = item, 0
p = tf.paragraphs[0] if first else tf.add_paragraph()
first = False
prefix = ("• " if level == 0 else "- ")
p.text = prefix + text
p.level = 0
p.space_after = Pt(10 if level == 0 else 6)
r = p.runs[0]
r.font.size = Pt(size if level == 0 else size - 2)
r.font.color.rgb = TEXTC if level == 0 else RGBColor(0x55,0x4A,0x3E)
r.font.bold = (level == 0)
return tb
def add_picture_boxed(slide, img_key, left, top, width, height, caption=None):
frame = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(left)-Inches(0.05), Inches(top)-Inches(0.05),
Inches(width)+Inches(0.1), Inches(height)+Inches(0.1)+ (Inches(0.35) if caption else 0))
frame.fill.solid(); frame.fill.fore_color.rgb = WHITE
frame.line.color.rgb = GOLD; frame.line.width = Pt(1.5); frame.shadow.inherit = False
stream = IMG_BYTES.get(img_key)
if stream is not None:
stream.seek(0)
slide.shapes.add_picture(stream, Inches(left), Inches(top), width=Inches(width), height=Inches(height))
if caption:
tb = slide.shapes.add_textbox(Inches(left), Inches(top+height+0.02), Inches(width), Inches(0.35))
tf = tb.text_frame; tf.word_wrap = True
p = tf.paragraphs[0]; p.text = caption; p.alignment = PP_ALIGN.CENTER
r = p.runs[0]; r.font.size = Pt(10.5); r.font.italic = True; r.font.color.rgb = RGBColor(0x66,0x5A,0x4C)
def title_slide():
slide = prs.slides.add_slide(BLANK)
add_bg(slide, MAROON)
stripe = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, Inches(5.6), SW, Inches(0.08))
stripe.fill.solid(); stripe.fill.fore_color.rgb = GOLD; stripe.line.fill.background(); stripe.shadow.inherit=False
add_picture_boxed(slide, "gross3d", 8.7, 1.0, 4.0, 4.0)
tb = slide.shapes.add_textbox(Inches(0.6), Inches(2.1), Inches(7.6), Inches(2.2))
tf = tb.text_frame; tf.word_wrap = True
p = tf.paragraphs[0]; p.text = "Anatomy & Physiology"
r = p.runs[0]; r.font.size = Pt(46); r.font.bold = True; r.font.color.rgb = WHITE
p2 = tf.add_paragraph(); p2.text = "of the Liver"
r2 = p2.runs[0]; r2.font.size = Pt(46); r2.font.bold = True; r2.font.color.rgb = GOLD
tb2 = slide.shapes.add_textbox(Inches(0.6), Inches(4.4), Inches(7.6), Inches(1.0))
tf2 = tb2.text_frame; tf2.word_wrap = True
p3 = tf2.paragraphs[0]; p3.text = "Gross anatomy, microscopic structure, blood supply, biliary system, and metabolic physiology"
r3 = p3.runs[0]; r3.font.size = Pt(17); r3.font.color.rgb = RGBColor(0xF0,0xD9,0xB5)
tb3 = slide.shapes.add_textbox(Inches(0.6), Inches(6.6), Inches(6), Inches(0.5))
tf3 = tb3.text_frame; p4 = tf3.paragraphs[0]; p4.text = "20-Slide Educational Deck | Medical & Nursing Curriculum"
r4 = p4.runs[0]; r4.font.size = Pt(12); r4.font.color.rgb = RGBColor(0xE0,0xC9,0xA5)
def content_slide(n, title, subtitle, items, img_key=None, cap=None, img_pos=(7.4,1.5,5.3,4.6), text_width=6.5):
slide = prs.slides.add_slide(BLANK)
add_bg(slide)
header(slide, title, subtitle)
bullets(slide, items, width=text_width)
if img_key:
add_picture_boxed(slide, img_key, *img_pos, caption=cap)
add_footer_bar(slide, n)
return slide
# ================= SLIDE CONTENT =================
title_slide()
content_slide(2, "Introduction to the Liver", "Largest gland in the body",
[
"Largest internal organ and largest gland - ~1.4-1.8 kg (~2% of body weight) in the adult",
"Located in the right upper quadrant of the abdomen, beneath the diaphragm",
"Protected by the lower rib cage; spans right hypochondrium, epigastrium, and part of left hypochondrium",
"Dual blood supply: hepatic artery (oxygen) + portal vein (nutrients) - unique among organs",
"Functions bridge anatomy across three systems: digestive, circulatory (filtration/storage), and endocrine/metabolic",
"Key functions preview: metabolism, detoxification, bile production, storage, synthesis, immune defense",
], img_key="gross3d", cap="3D illustration - liver in situ, anterior view", img_pos=(7.5,1.6,5.2,4.3))
content_slide(3, "Gross Anatomy - External Features", "Surfaces, borders, and location",
[
"Diaphragmatic (superior/anterior) surface - smooth, convex, molded to the diaphragm",
"Visceral (posteroinferior) surface - contains the porta hepatis and impressions from adjacent organs (stomach, duodenum, colon, kidney, adrenal)",
"Porta hepatis: hilum where the portal vein, hepatic artery, and hepatic ducts enter/exit",
"Sharp inferior border separates the two surfaces anteriorly",
"Bare area: posterior region lacking peritoneal covering, directly attached to the diaphragm",
"Related structures: gallbladder fossa, IVC groove, ligamentum teres fissure",
], img_key="gross3d", cap="Anterior 3D view of hepatic lobes and ligaments")
content_slide(4, "Lobes and Peritoneal Ligaments", "Anatomical vs functional division",
[
"Anatomically the liver has 4 lobes: right, left, caudate, and quadrate (right larger than left)",
"Falciform ligament - anterior fold of peritoneum separating right and left lobes, attaches liver to anterior abdominal wall",
"Ligamentum teres hepatis - fibrous remnant of the fetal umbilical vein, runs in the free edge of the falciform ligament",
"Ligamentum venosum - remnant of the fetal ductus venosus, lies in a fissure on the visceral surface",
"Coronary and triangular ligaments - anchor the liver to the diaphragm, define the bare area",
"Lesser omentum (hepatoduodenal + hepatogastric) connects liver to stomach/duodenum and carries the portal triad",
], img_key="couinaud", cap="Contrast CT - Couinaud segmental landmarks", img_pos=(7.5,1.7,5.2,4.1))
content_slide(5, "Functional Segmental Anatomy", "Couinaud's 8-segment classification",
[
"Functional division is based on vascular and biliary supply, not surface lobes - critical for liver surgery",
"Principal (Cantlie's) plane runs from the gallbladder fossa to the IVC, along the middle hepatic vein - divides true right and left liver",
"Caudate lobe = Segment I (independent blood supply and venous drainage)",
"Left liver = Segments II, III, IVa/IVb",
"Right liver = Segments V, VI, VII, VIII",
"Each segment has its own portal pedicle (artery, portal vein branch, bile duct) and hepatic venous drainage - allows segmental resection",
], img_key="couinaud", cap="Axial CT slices showing numbered Couinaud segments", img_pos=(7.3,1.6,5.5,4.4))
content_slide(6, "Blood Supply - Dual Afferent System", "Portal vein + hepatic artery",
[
"Portal vein: ~70-75% of hepatic blood flow, nutrient-rich but relatively deoxygenated blood from the GI tract, spleen, and pancreas",
"Hepatic artery (branch of celiac trunk): ~25-30% of flow, but supplies roughly half of the liver's oxygen",
"Both vessels enter at the porta hepatis, dividing into right and left branches supplying respective segments",
"Blood mixes in the hepatic sinusoids before draining toward the central vein of each lobule",
"Pringle manoeuvre: temporary clamping of the hepatoduodenal ligament (portal triad) to control hemorrhage during liver surgery",
"Hepatic artery buffer response protects total liver flow when portal flow falls",
], img_key="vasculature", cap="Hepatoduodenal ligament - portal triad and Pringle manoeuvre", img_pos=(7.4,1.6,5.4,4.3))
content_slide(7, "Venous Drainage", "Hepatic veins and the caval system",
[
"Hepatic sinusoids drain into central veins, which unite into hepatic venules and then hepatic veins",
"Three major hepatic veins (right, middle, left) drain directly into the inferior vena cava, just below the diaphragm",
"No valves in the hepatic veins - flow is passive, following the pressure gradient into the IVC and right atrium",
"Middle hepatic vein runs in the principal plane and is a key surgical landmark",
"Caudate lobe (segment I) drains via separate short hepatic veins directly into the IVC",
"Elevated central venous pressure (e.g. right heart failure) causes hepatic congestion - 'nutmeg liver'",
])
content_slide(8, "Biliary Tree", "From canaliculi to the duodenum",
[
"Bile canaliculi (between hepatocytes) collect bile and drain into small interlobular bile ductules",
"Ductules join to form right and left hepatic ducts, which unite at the porta hepatis into the common hepatic duct",
"Common hepatic duct joins the cystic duct (from the gallbladder) to form the common bile duct (CBD)",
"Gallbladder stores and concentrates bile between meals; CCK triggers contraction and sphincter of Oddi relaxation",
"CBD joins the main pancreatic duct at the ampulla of Vater, opening into the duodenum, guarded by the sphincter of Oddi",
"Bile aids emulsification and absorption of dietary fats and fat-soluble vitamins (A, D, E, K)",
], img_key="biliary", cap="Biliary tree anatomy - hepatic ducts, CBD, gallbladder", img_pos=(7.3,1.6,5.5,4.4))
content_slide(9, "Microscopic Anatomy - The Classic Lobule", "Hexagonal functional unit",
[
"50,000-100,000 lobules per liver; each is a hexagonal cylinder, several mm long, 0.8-2 mm in diameter",
"Central vein at the core; hepatocyte plates radiate outward like spokes of a wheel",
"Portal triad at each of the 6 corners: branch of hepatic artery, branch of portal vein, and a bile ductule",
"Blood flows from portal triads through sinusoids toward the central vein (portal to central flow)",
"Bile flows in the opposite direction - from hepatocytes into canaliculi toward the portal bile ductules",
"Hepatic plates are two cells thick, separated by sinusoids lined with fenestrated endothelium",
], img_key="lobule_hist", cap="Hepatic lobule schematic vs H&E histology", img_pos=(7.2,1.55,5.6,4.6))
content_slide(10, "Functional Models: Acinus & Portal Lobule", "Zonal metabolic architecture",
[
"Portal lobule model: centers on the portal triad, emphasizing exocrine (bile) secretion",
"Liver acinus (Rappaport) model: centers on the terminal portal venule/arteriole, reflecting actual blood perfusion",
"Acinus is divided into three zones by oxygen/nutrient gradient along sinusoidal flow:",
("Zone 1 (periportal) - highest oxygen; oxidative metabolism, gluconeogenesis, beta-oxidation", 1),
("Zone 2 (midzonal) - intermediate", 1),
("Zone 3 (pericentral/perivenular) - lowest oxygen; glycolysis, lipogenesis, detoxification (cytochrome P450), most vulnerable to ischemia/toxins", 1),
])
content_slide(11, "Hepatocytes", "The principal functional cell (~80% of liver mass)",
[
"Large polygonal cells, 20-30 micrometers; many binucleate and tetraploid",
"Abundant rough ER - synthesis of plasma proteins (albumin, clotting factors)",
"Extensive smooth ER - detoxification/biotransformation (cytochrome P450), bilirubin conjugation (glucuronosyltransferase)",
"Numerous mitochondria (800-1000/cell) providing energy for metabolism and synthesis",
"Peroxisomes - fatty acid oxidation, hydrogen peroxide breakdown, purine metabolism",
"Six-sided geometry: surfaces face the sinusoid (space of Disse), neighboring hepatocytes, and bile canaliculi",
"Average lifespan ~5 months; capable of remarkable regeneration after injury or resection",
])
content_slide(12, "Sinusoids, Space of Disse & Non-Parenchymal Cells", "The liver's microcirculatory unit",
[
"Hepatic sinusoids are fenestrated, low-pressure vascular channels between hepatocyte plates carrying mixed portal/arterial blood",
"Lined by specialized fenestrated endothelial cells (large pores, up to ~1 micrometer) allowing free plasma protein exchange",
"Kupffer cells - resident macrophages in the sinusoidal lining; phagocytose bacteria, debris, and aged red cells (>99% of portal bacteria cleared)",
"Space of Disse (perisinusoidal space) - between endothelium and hepatocytes; site of nutrient/plasma protein exchange and lymph formation",
"Hepatic stellate cells (Ito cells) reside in the space of Disse - store vitamin A, and transform into myofibroblasts producing collagen in liver fibrosis",
"Lymphatics arising in the space of Disse drain via interlobular septa - liver is the major source of body lymph",
], img_key="sinusoid", cap="Hepatic sinusoid: hepatocytes, LSECs, Kupffer cells, stellate cells", img_pos=(7.3,1.6,5.5,4.4))
content_slide(13, "Physiology Overview - Five Major Roles", "Guyton's functional summary",
[
"1. Filtration & storage of blood - reservoir function, buffers venous return, clears bacteria/antigens via Kupffer cells",
"2. Metabolism - carbohydrates, proteins, fats, hormones, and drugs/foreign chemicals",
"3. Formation of bile - digestion and absorption of fats and fat-soluble vitamins",
"4. Storage - vitamins (A, D, E, K, B12), iron (as ferritin), and glycogen",
"5. Synthesis of coagulation factors and plasma proteins (albumin, most clotting factors, angiotensinogen)",
"These functions are deeply interrelated - liver failure produces a syndrome affecting multiple systems simultaneously",
])
content_slide(14, "Carbohydrate & Lipid Metabolism", "Blood glucose buffer and lipid hub",
[
"Glycogen storage - liver stores glucose as glycogen after meals (glycogenesis) and releases it during fasting (glycogenolysis)",
"'Glucose buffer function' - liver removes/returns glucose to keep blood glucose stable",
"Gluconeogenesis - synthesizes glucose from amino acids, glycerol, and lactate when glucose is low",
"Converts galactose and fructose to glucose",
"Beta-oxidation of fatty acids for energy (acetyl-CoA -> citric acid cycle); forms ketone bodies during fasting",
"Synthesizes cholesterol, phospholipids, and most plasma lipoproteins (VLDL, HDL precursors)",
"Converts excess carbohydrate and protein into fat for storage",
])
content_slide(15, "Protein Metabolism & Synthetic Function", "The liver as the body's protein factory",
[
"Deamination of amino acids - removes amino groups, enabling their use for energy or gluconeogenesis",
"Urea formation - converts toxic ammonia (from deamination and gut bacteria) into urea for renal excretion",
"Synthesizes almost all plasma proteins: albumin (oncotic pressure, transport), globulins, and clotting factors (I, II, V, VII, IX, X, XI, fibrinogen)",
"Synthesizes nonessential amino acids via transamination",
"Interconversion of amino acids to support protein synthesis needs across the body",
"Chronic liver disease -> hypoalbuminemia (edema/ascites) and coagulopathy (bleeding risk)",
])
content_slide(16, "Bile Formation, Bilirubin & Detoxification", "Excretory and biotransformation function",
[
"Hepatocytes secrete ~600-1000 mL bile/day: bile acids, bilirubin, cholesterol, phospholipids, electrolytes",
"Bile acids (from cholesterol) emulsify fats, aiding digestion/absorption of lipids and fat-soluble vitamins; recycled via enterohepatic circulation",
"Bilirubin: breakdown product of hemoglobin; taken up by hepatocytes, conjugated with glucuronic acid (UGT1A1), and excreted in bile",
"Cytochrome P450 (smooth ER) - Phase I oxidation of drugs, alcohol, hormones, and environmental toxins",
"Phase II conjugation (glucuronidation, sulfation) increases water solubility for excretion in bile or urine",
"Ammonia detoxification via the urea cycle; impaired in liver failure -> hepatic encephalopathy",
], img_key="bilirubin", cap="Hepatocyte bilirubin uptake, conjugation, and biliary excretion", img_pos=(7.3,1.6,5.5,4.4))
content_slide(17, "Storage & Hematologic Functions", "Reservoir and blood-related roles",
[
"Vitamin storage - large reserves of vitamin A (1-2 years), and D, E, K, and B12",
"Iron storage as ferritin - regulates systemic iron availability via hepcidin production",
"Glycogen storage - major buffer for blood glucose regulation",
"Blood reservoir - hepatic sinusoids/veins can store 450-550 mL of blood, providing a compensatory reserve in hemorrhage or heart failure",
"Site of fetal erythropoiesis (hematopoiesis) during intrauterine life",
"Synthesizes thrombopoietin and hepcidin, and clears aged red blood cells via Kupffer cells",
])
content_slide(18, "Immunological & Thermoregulatory Roles", "Beyond metabolism",
[
"Part of the mononuclear phagocyte (reticuloendothelial) system via Kupffer cells",
"First-line defense against gut-derived bacteria, endotoxin, and antigens absorbed from the portal circulation",
"Produces acute-phase proteins (CRP, complement components) during systemic inflammation",
"High metabolic rate generates substantial heat, contributing to core body temperature maintenance",
"Angiotensinogen synthesis links the liver to blood pressure regulation (renin-angiotensin system)",
"Hormone metabolism/clearance - inactivates insulin, glucagon, steroid and thyroid hormones",
])
content_slide(19, "Clinical Correlations", "When liver anatomy/physiology fails",
[
"Jaundice - elevated bilirubin from hepatocellular, hemolytic, or obstructive (biliary) causes",
"Cirrhosis - chronic fibrosis distorts lobular architecture, activated stellate cells drive collagen deposition -> portal hypertension",
"Portal hypertension - varices, ascites, splenomegaly, caput medusae (from portal vein anatomy)",
"Hepatic encephalopathy - impaired ammonia clearance/urea cycle dysfunction",
"Coagulopathy & hypoalbuminemia - failure of synthetic function",
"Liver function tests reflect specific structures: ALT/AST (hepatocyte injury), ALP/GGT/bilirubin (biliary), albumin/INR (synthetic function)",
"Segmental (Couinaud) anatomy underpins safe surgical resection and living-donor transplantation",
])
content_slide(20, "Summary", "Key takeaways",
[
"The liver is a uniquely dual-perfused organ (portal vein + hepatic artery) organized into 8 functional segments",
"The hepatic lobule is the structural unit; the acinus is the functional (zonal) unit of blood flow and metabolism",
"Hepatocytes drive metabolism, synthesis, storage, and detoxification; Kupffer cells and stellate cells support immune and structural functions",
"The biliary tree channels hepatic secretions to the gut for fat digestion and waste elimination",
"Physiology (metabolic, synthetic, excretory, immune) is inseparable from the anatomy that supports it",
"References: Guyton & Hall Medical Physiology; Gray's Anatomy for Students; Junqueira's Basic Histology; Bailey & Love's Short Practice of Surgery; Histology - A Text and Atlas (Ross & Pawlina)",
])
prs.save("/tmp/workspace/liver-ppt/Liver_Anatomy_Physiology.pptx")
print("DONE")
cd /tmp/workspace/liver-ppt && python build_deck.py
/tmp/skills/shared/scripts
/tmp/skills
ls -la /tmp/skills/shared/scripts/ 2>&1; echo '---'; ls -la /tmp/skills/ 2>&1
~/liver-ppt/build_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/liver-ppt/build_deck.py'
cd /tmp/workspace/liver-ppt && python build_deck.py
cd /tmp/workspace/liver-ppt && python -c " from pptx import Presentation p = Presentation('Liver_Anatomy_Physiology.pptx') print('Slides:', len(p.slides.__iter__.__self__._sldIdLst)) " ; ls -la /tmp/workspace/liver-ppt/
Liver Anatomy Physiology
Presentation · PPTX