from pptx import Presentation from pptx.util import Inches, Pt # Create a presentation object prs = Presentation() # Define slide layouts title_slide_layout = prs.slide_layouts[0] content_slide_layout = prs.slide_layouts[1] # Title Slide slide = prs.slides.add_slide(title_slide_layout) title = slide.shapes.title title.text = "Headache: Types and Imaging of Headache" subtitle = slide.placeholders[1] subtitle.text = "Lecture for 4th Year Radiology Technology Students" # Helper function to add content slides def add_slide(title_text, content_lines, image_path=None): slide = prs.slides.add_slide(content_slide_layout) title = slide.shapes.title content = slide.placeholders[1] title.text = title_text tf = content.text_frame for line in content_lines: p = tf.add_paragraph() p.text = line p.font.size = Pt(20) if image_path: slide.shapes.add_picture(image_path, Inches(5), Inches(2), Inches(4), Inches(3)) # Slides with optional image placeholders add_slide("Learning Objectives", [ "Classify common types of headache", "Recognize red-flag symptoms", "Choose appropriate imaging modality", "Interpret imaging findings in secondary headaches" ]) add_slide("Introduction", [ "Headache: common neurological complaint", "Primary vs Secondary headaches", "Radiology role: mainly in secondary headaches" ]) add_slide("Classification", [ "Primary headaches: Migraine, Tension-type, Cluster", "Secondary headaches: Hemorrhage, Tumor, Infection, Vascular, Others" ]) add_slide("Primary Headaches – Migraine", [ "Unilateral, pulsating pain", "Photophobia, aura possible", "Imaging usually normal", "MRI if atypical presentation" ], image_path="images/migraine_mri.jpg") add_slide("Primary Headaches – Tension-type", [ "Bilateral, pressure-like", "Stress-related", "No imaging unless red flags" ]) add_slide("Primary Headaches – Cluster", [ "Severe orbital/temporal pain", "Autonomic symptoms (lacrimation, rhinorrhea)", "MRI brain and pituitary recommended" ], image_path="images/cluster_mri.jpg") add_slide("Secondary Headaches", [ "Important for radiology", "Causes include hemorrhage, tumor, infection, vascular abnormalities" ]) add_slide("Intracranial Hemorrhage", [ "Thunderclap headache", "Imaging: Non-contrast CT first line", "CT/MR angiography for aneurysm" ], image_path="images/sah_ct.jpg") add

Comments

Popular posts from this blog

**🔥 Breakthrough Harvard Study Reveals: Your Immune System Needs This Powerful Detox Boost! 🔥**

**Unlock Your Potential with The Home Business Academy – Act Now and Share the Profit!**

فرصتك لبدء مشروعك الرقمي وبناء دخل مستمر – بدون خبرة تقنية