Hip bone, femur, tibia, fibula : landmark according to bdc vol 2 detailed for first time study with images

Reading File
Finding Sources
Searching Images

hip bone os coxae anatomy landmarks

This anatomical illustration demonstrates landmark configurations on the human os coxae, categorized into regions associated with the 'False Pelvis' and 'True Pelvis.' The visual consists of four medical diagrams of the hip bone (innominate bone) in lateral and medial views, showing specific anatomical points used for morphometric analysis. In the 'False Pelvis' diagrams (left), red numbered landmarks (1–3, 12, 14–16, 18–25, 27) are predominantly distributed along the ilium, including the iliac crest, anterior superior iliac spine, and posterior superior iliac spine. In the 'True Pelvis' diagrams (right), the landmarks (3–18, 26) shift focus toward the ischium, the ischial tuberosity, and the pubic ramus, representing the area surrounding the birth canal. Both configurations include landmarks clustered around the acetabulum (14–18), serving as a common reference point for orientation. This material is used to study pelvic morphology, sexual dimorphism, and obstetrical constraints in human evolution and clinical anatomy.

This anatomical illustration demonstrates landmark configurations on the human os coxae, categorized into regions associated with the 'False Pelvis' and 'True Pelvis.' The visual consists of four medical diagrams of the hip bone (innominate bone) in lateral and medial views, showing specific anatomical points used for morphometric analysis. In the 'False Pelvis' diagrams (left), red numbered landmarks (1–3, 12, 14–16, 18–25, 27) are predominantly distributed along the ilium, including the iliac crest, anterior superior iliac spine, and posterior superior iliac spine. In the 'True Pelvis' diagrams (right), the landmarks (3–18, 26) shift focus toward the ischium, the ischial tuberosity, and the pubic ramus, representing the area surrounding the birth canal. Both configurations include landmarks clustered around the acetabulum (14–18), serving as a common reference point for orientation. This material is used to study pelvic morphology, sexual dimorphism, and obstetrical constraints in human evolution and clinical anatomy.

A multi-paneled interface from a medical image computing platform (3D Slicer) demonstrating the anatomical segmentation of the os coxae (hip bone). The display is divided into four quadrants providing a synchronized view of the pelvic anatomy. The top-left panel shows an axial CT slice, the bottom-left shows a coronal CT slice, and the bottom-right shows a sagittal CT slice. In each 2D radiological view, the right os coxae is highlighted with a yellow semi-transparent mask to indicate precise segmentation boundaries against the grayscale bone and soft tissue. The top-right panel features a 3D volumetric reconstruction of the segmented right os coxae in yellow, clearly showing complex morphological landmarks including the iliac crest, the acetabulum, the ischium, and the obturator foramen. This visualization is characteristic of virtual surgical planning (VSP) and anatomical modeling for orthopedic education or preoperative assessment.

A multi-paneled interface from a medical image computing platform (3D Slicer) demonstrating the anatomical segmentation of the os coxae (hip bone). The display is divided into four quadrants providing a synchronized view of the pelvic anatomy. The top-left panel shows an axial CT slice, the bottom-left shows a coronal CT slice, and the bottom-right shows a sagittal CT slice. In each 2D radiological view, the right os coxae is highlighted with a yellow semi-transparent mask to indicate precise segmentation boundaries against the grayscale bone and soft tissue. The top-right panel features a 3D volumetric reconstruction of the segmented right os coxae in yellow, clearly showing complex morphological landmarks including the iliac crest, the acetabulum, the ischium, and the obturator foramen. This visualization is characteristic of virtual surgical planning (VSP) and anatomical modeling for orthopedic education or preoperative assessment.

A clinical photograph of a human os coxae (hip bone) specimen, focusing on the lateral aspect of the acetabulum. The image demonstrates the anatomical landmarks used for skeletal morphometry and sex determination in forensic anthropology or osteology. Two blue measurement lines are superimposed within the acetabular fossa: line '1' indicates the vertical acetabular diameter, extending from the superior rim to the inferior margin; line '2' represents the transverse acetabular diameter, oriented perpendicularly to line '1'. The surrounding cortical bone exhibits a weathered, brownish-yellow appearance typical of dry bone specimens. Visible structures include the acetabular rim, the lunate surface, the obturator foramen located inferiorly, and portions of the ilium, ischium, and pubis. This visual is designed to illustrate standardized methods for quantifying pelvic morphology to assist in clinical research or archaeological assessment.

A clinical photograph of a human os coxae (hip bone) specimen, focusing on the lateral aspect of the acetabulum. The image demonstrates the anatomical landmarks used for skeletal morphometry and sex determination in forensic anthropology or osteology. Two blue measurement lines are superimposed within the acetabular fossa: line '1' indicates the vertical acetabular diameter, extending from the superior rim to the inferior margin; line '2' represents the transverse acetabular diameter, oriented perpendicularly to line '1'. The surrounding cortical bone exhibits a weathered, brownish-yellow appearance typical of dry bone specimens. Visible structures include the acetabular rim, the lunate surface, the obturator foramen located inferiorly, and portions of the ilium, ischium, and pubis. This visual is designed to illustrate standardized methods for quantifying pelvic morphology to assist in clinical research or archaeological assessment.

Finding Sources
Searching Images

femur bone anatomy landmarks greater trochanter lesser trochanter

This diagnostic clinical image shows a high-contrast coronal cross-section of the proximal human femur, illustrating the classic anatomical landmarks including the femoral head, neck, greater trochanter, and the superior portion of the femoral shaft. The image highlights the distinctive internal architecture of bone, primarily the cancellous (trabecular) bone and the outer cortical bone layer. The trabecular network is highly organized, demonstrating clear orientations that correlate with Wolff’s Law, where bone grows in response to the loads placed upon it. Specifically, the primary compressive trabeculae are seen radiating from the superior aspect of the femoral head down through the neck, while tensile trabeculae arc across from the lateral cortex through the neck toward the head. The greater trochanter shows a less organized but distinct spongy structure. The dense cortical bone is visible as a thick perimeter, particularly along the medial and lateral aspects of the femoral shaft. A dark, solid region at the center of the shaft represents the medullary cavity. This image serves as a fundamental educational tool for orthopedic biomechanics, anatomy, and the study of bone density and stress distribution.

This diagnostic clinical image shows a high-contrast coronal cross-section of the proximal human femur, illustrating the classic anatomical landmarks including the femoral head, neck, greater trochanter, and the superior portion of the femoral shaft. The image highlights the distinctive internal architecture of bone, primarily the cancellous (trabecular) bone and the outer cortical bone layer. The trabecular network is highly organized, demonstrating clear orientations that correlate with Wolff’s Law, where bone grows in response to the loads placed upon it. Specifically, the primary compressive trabeculae are seen radiating from the superior aspect of the femoral head down through the neck, while tensile trabeculae arc across from the lateral cortex through the neck toward the head. The greater trochanter shows a less organized but distinct spongy structure. The dense cortical bone is visible as a thick perimeter, particularly along the medial and lateral aspects of the femoral shaft. A dark, solid region at the center of the shaft represents the medullary cavity. This image serves as a fundamental educational tool for orthopedic biomechanics, anatomy, and the study of bone density and stress distribution.

This diagnostic image is an anterior-posterior (AP) X-ray radiograph of the proximal right femur and partial pelvis. The anatomical landmarks depicted include the femoral head, femoral neck, greater and lesser trochanters, and the proximal femoral shaft. The image demonstrates a fracture involving the proximal femur with a visible fracture line extending superiorly into the greater trochanteric region, indicated by two white arrows. The cortical bone appears thinned, and there is a noticeable disruption of the normal trabecular pattern in the femoral neck, characteristic of a fragility-type fracture. The orientation of the fracture line through the greater trochanter is used to differentiate typical fragility fractures from atypical femoral fractures. External artifacts, including numeric markers and wire-like lines, are visible across the femoral shaft, likely used for intraoperative or radiographic measurement. The image serves as an educational tool for orthopedic classification, illustrating the distinction between fragility fractures and atypical femoral stress fractures based on anatomical involvement.

This diagnostic image is an anterior-posterior (AP) X-ray radiograph of the proximal right femur and partial pelvis. The anatomical landmarks depicted include the femoral head, femoral neck, greater and lesser trochanters, and the proximal femoral shaft. The image demonstrates a fracture involving the proximal femur with a visible fracture line extending superiorly into the greater trochanteric region, indicated by two white arrows. The cortical bone appears thinned, and there is a noticeable disruption of the normal trabecular pattern in the femoral neck, characteristic of a fragility-type fracture. The orientation of the fracture line through the greater trochanter is used to differentiate typical fragility fractures from atypical femoral fractures. External artifacts, including numeric markers and wire-like lines, are visible across the femoral shaft, likely used for intraoperative or radiographic measurement. The image serves as an educational tool for orthopedic classification, illustrating the distinction between fragility fractures and atypical femoral stress fractures based on anatomical involvement.

Two diagnostic X-ray radiographs show the proximal femur at different angles (Anteroposterior and likely a frog-leg or lateral view). Key visible landmarks include the femoral head, femoral neck, greater trochanter, lesser trochanter, and the proximal femoral shaft. The image highlights the calcar femorale with black arrows and text labels. Radiographically, the calcar femorale appears as a distinct vertical band of increased radiopacity (density) along the medial aspect of the femoral neck. It extends from the inferior femoral neck toward the lesser trochanter, demonstrating its role as a dense plate of cortical bone that provides structural support against compressive loads. The images illustrate the normal trabecular pattern and cortical thickness of the hip joint, emphasizing the biomechanical importance of the calcar in orthopedic surgery, particularly for fracture fixation and hip arthroplasty planning.

Two diagnostic X-ray radiographs show the proximal femur at different angles (Anteroposterior and likely a frog-leg or lateral view). Key visible landmarks include the femoral head, femoral neck, greater trochanter, lesser trochanter, and the proximal femoral shaft. The image highlights the calcar femorale with black arrows and text labels. Radiographically, the calcar femorale appears as a distinct vertical band of increased radiopacity (density) along the medial aspect of the femoral neck. It extends from the inferior femoral neck toward the lesser trochanter, demonstrating its role as a dense plate of cortical bone that provides structural support against compressive loads. The images illustrate the normal trabecular pattern and cortical thickness of the hip joint, emphasizing the biomechanical importance of the calcar in orthopedic surgery, particularly for fracture fixation and hip arthroplasty planning.

Searching Images

tibia fibula anatomy landmarks medial malleolus anterior border

This diagnostic axial CT scan image of the distal tibia and fibula demonstrates a postero-lateral type posterior malleolar fracture being stabilized with internal fixation. The image is annotated with anatomical landmarks (Anterior, Posterior, Medial, Lateral) and a four-quadrant grid system. A horizontal bimalleolar reference line and a perpendicular vertical line divide the posterior malleolus into medial and lateral areas. A metallic cannulated lag screw is seen traversing the distal tibia from an anterior-to-posterior direction, specifically targeting the fracture fragment in the posterolateral quadrant. The image highlights the 'Trajectory Angle,' which is the angle between the screw's path and the perpendicular reference line. This educational diagram illustrates the optimal surgical planning and trajectory for percutaneous screw fixation of posterior malleolar fragments based on CT classification. The fibula is visible lateral to the tibia, and the cortical bone of the tibia shows the insertion point of the hardware relative to the medial malleolus and the Chaput tubercle.

This diagnostic axial CT scan image of the distal tibia and fibula demonstrates a postero-lateral type posterior malleolar fracture being stabilized with internal fixation. The image is annotated with anatomical landmarks (Anterior, Posterior, Medial, Lateral) and a four-quadrant grid system. A horizontal bimalleolar reference line and a perpendicular vertical line divide the posterior malleolus into medial and lateral areas. A metallic cannulated lag screw is seen traversing the distal tibia from an anterior-to-posterior direction, specifically targeting the fracture fragment in the posterolateral quadrant. The image highlights the 'Trajectory Angle,' which is the angle between the screw's path and the perpendicular reference line. This educational diagram illustrates the optimal surgical planning and trajectory for percutaneous screw fixation of posterior malleolar fragments based on CT classification. The fibula is visible lateral to the tibia, and the cortical bone of the tibia shows the insertion point of the hardware relative to the medial malleolus and the Chaput tubercle.

This diagnostic image is an axial (transversal) CT scan of a left ankle, taken approximately 10 mm proximal to the tibial plafond. It demonstrates post-operative osteosynthesis hardware and provides a visual guide for measuring distal tibio-fibular syndesmotic alignment. The image shows the distal tibia and fibula with metallic implants: the lateral malleolus is stabilized by two screws, while the medial malleolus shows a plate-and-screw construct. Educational annotations illustrate two critical 2D measurement parameters: the tibio-fibular clear space (LCS), shown as the horizontal distance between the lateral border of the posterior tibial incisura and the medial border of the fibula; and the anterior tibio-fibular distance (antTFD), represented by the dashed double-arrow line measuring the interval between the anterior tibial tubercle and the anterior aspect of the fibula. Reference lines indicate the anatomical landmarks used to standardize these measurements, which are essential for evaluating syndesmotic reduction and identifying post-operative malalignment such as diastasis or fibular translation. This material is designed for orthopedic surgery and radiology education to assess the quality of ankle fracture fixation.

This diagnostic image is an axial (transversal) CT scan of a left ankle, taken approximately 10 mm proximal to the tibial plafond. It demonstrates post-operative osteosynthesis hardware and provides a visual guide for measuring distal tibio-fibular syndesmotic alignment. The image shows the distal tibia and fibula with metallic implants: the lateral malleolus is stabilized by two screws, while the medial malleolus shows a plate-and-screw construct. Educational annotations illustrate two critical 2D measurement parameters: the tibio-fibular clear space (LCS), shown as the horizontal distance between the lateral border of the posterior tibial incisura and the medial border of the fibula; and the anterior tibio-fibular distance (antTFD), represented by the dashed double-arrow line measuring the interval between the anterior tibial tubercle and the anterior aspect of the fibula. Reference lines indicate the anatomical landmarks used to standardize these measurements, which are essential for evaluating syndesmotic reduction and identifying post-operative malalignment such as diastasis or fibular translation. This material is designed for orthopedic surgery and radiology education to assess the quality of ankle fracture fixation.

This diagnostic image is an anteroposterior (AP) x-ray radiograph of the human ankle joint, demonstrating the methodology for measuring the Medial Malleolar Height Angle (MMHA). The radiograph clearly shows the distal tibia, distal fibula, and talus. Anatomical landmarks include the medial and lateral malleoli and the tibiotalar joint space. Superimposed on the anatomy are two red lines intersecting at point 'b' to define the MMHA. Line 'a-b' represents the distal tibial joint orientation line, where point 'b' is the lateral-most point of the tibiotalar joint line and point 'a' is on the medial side of the joint surface. Line 'b-c' connects the lateral point of the joint line to the most distal tip of the medial malleolus (point 'c'). This measurement is utilized in orthopedic assessment to evaluate bone geometry and morphological characteristics that may contribute to chronic ankle instability (CAI). The image serves as an educational tool for clinical imaging and orthopedic residency training in ankle alignment and morphometry.

This diagnostic image is an anteroposterior (AP) x-ray radiograph of the human ankle joint, demonstrating the methodology for measuring the Medial Malleolar Height Angle (MMHA). The radiograph clearly shows the distal tibia, distal fibula, and talus. Anatomical landmarks include the medial and lateral malleoli and the tibiotalar joint space. Superimposed on the anatomy are two red lines intersecting at point 'b' to define the MMHA. Line 'a-b' represents the distal tibial joint orientation line, where point 'b' is the lateral-most point of the tibiotalar joint line and point 'a' is on the medial side of the joint surface. Line 'b-c' connects the lateral point of the joint line to the most distal tip of the medial malleolus (point 'c'). This measurement is utilized in orthopedic assessment to evaluate bone geometry and morphological characteristics that may contribute to chronic ankle instability (CAI). The image serves as an educational tool for clinical imaging and orthopedic residency training in ankle alignment and morphometry.

Reading File
Finding Sources
Searching Images

ilium ischium pubis hip bone lateral medial view anatomy diagram labeled

Educational anatomical diagram set showing morphometric measurements of the human hip bone (os coxae). The top two panels demonstrate lateral and medial views of the ilium and ischium, identifying key landmarks including the Posterior Superior Iliac Spine (PSIS), Anterior Superior Iliac Spine (ASIS), Ischial Tuberosity (IT), Highest point of the Iliac Crest (HIC), Pubic Tuberosity (PT), and the Auricular Surface (AS). Linear measurements shown (Lab, Lcd, Lac, Lae, Laf) define the spatial relationships between these landmarks for skeletal analysis. The bottom three panels provide high-magnification views specifically focused on the PSIS morphology. These detailed frames illustrate measurements for surgical and forensic relevance, including the tip width (W0), maximum width (Wmax), tip thickness (T0), and the distance to the Transition of the Iliac Crest (TIC). The content is designed for orthopaedic, forensic, and anatomical education, illustrating the standardized methodology for quantifying pelvic skeletal variation and point-of-interest dimensions.

Educational anatomical diagram set showing morphometric measurements of the human hip bone (os coxae). The top two panels demonstrate lateral and medial views of the ilium and ischium, identifying key landmarks including the Posterior Superior Iliac Spine (PSIS), Anterior Superior Iliac Spine (ASIS), Ischial Tuberosity (IT), Highest point of the Iliac Crest (HIC), Pubic Tuberosity (PT), and the Auricular Surface (AS). Linear measurements shown (Lab, Lcd, Lac, Lae, Laf) define the spatial relationships between these landmarks for skeletal analysis. The bottom three panels provide high-magnification views specifically focused on the PSIS morphology. These detailed frames illustrate measurements for surgical and forensic relevance, including the tip width (W0), maximum width (Wmax), tip thickness (T0), and the distance to the Transition of the Iliac Crest (TIC). The content is designed for orthopaedic, forensic, and anatomical education, illustrating the standardized methodology for quantifying pelvic skeletal variation and point-of-interest dimensions.

This diagnostic image is a frog-leg lateral (Lauenstein view) X-ray radiograph of the pediatric pelvis and bilateral hip joints. The pelvic ring, including the ilium, ischium, and pubis, is visible with clear visualization of the acetabula. The proximal femurs are abducted and externally rotated. The primary pathology is a displaced avulsion fracture of the left lesser trochanter. This is characterized by a cortical bone fragment detached from the medial aspect of the left proximal femur and displaced inferiorly. The irregular bony contour at the donor site on the left femoral shaft is evident, while the right lesser trochanter remains intact and anatomically normal. The femoral heads appear well-seated within the hip joints with preserved joint spaces. This finding is typical of an adolescent traction injury at the iliopsoas muscle insertion point. The educational focus is on identifying apophyseal avulsion fractures in the pediatric population, specifically involving the lesser trochanter in the setting of athletic injury.

This diagnostic image is a frog-leg lateral (Lauenstein view) X-ray radiograph of the pediatric pelvis and bilateral hip joints. The pelvic ring, including the ilium, ischium, and pubis, is visible with clear visualization of the acetabula. The proximal femurs are abducted and externally rotated. The primary pathology is a displaced avulsion fracture of the left lesser trochanter. This is characterized by a cortical bone fragment detached from the medial aspect of the left proximal femur and displaced inferiorly. The irregular bony contour at the donor site on the left femoral shaft is evident, while the right lesser trochanter remains intact and anatomically normal. The femoral heads appear well-seated within the hip joints with preserved joint spaces. This finding is typical of an adolescent traction injury at the iliopsoas muscle insertion point. The educational focus is on identifying apophyseal avulsion fractures in the pediatric population, specifically involving the lesser trochanter in the setting of athletic injury.

This clinical photograph shows a medial view of a right cadaveric hemipelvis specimen used in an orthopedic biomechanics study. The image highlights the internal pelvic anatomy, specifically identifying the ilium, ischium, and pubis. An asterisk marks the anterior superior iliac spine (ASIS) for orientation. Centrally, the medial wall of the acetabulum has been surgically opened (transpelvic portal) to reveal the intact hip capsule and acetabular fossa from the inside. The hip is positioned in a state of deep flexion, allowing for the visual assessment of the internal capsular structures. The specimen is mounted in a testing rig, visible via the femoral shaft extending to the right. This visual demonstrates a specialized surgical technique for total hip arthroplasty (THA) research, where components are implanted through the medial wall to preserve the entire native capsular ligamentous complex, facilitating the study of post-operative hip stability and range of motion.

This clinical photograph shows a medial view of a right cadaveric hemipelvis specimen used in an orthopedic biomechanics study. The image highlights the internal pelvic anatomy, specifically identifying the ilium, ischium, and pubis. An asterisk marks the anterior superior iliac spine (ASIS) for orientation. Centrally, the medial wall of the acetabulum has been surgically opened (transpelvic portal) to reveal the intact hip capsule and acetabular fossa from the inside. The hip is positioned in a state of deep flexion, allowing for the visual assessment of the internal capsular structures. The specimen is mounted in a testing rig, visible via the femoral shaft extending to the right. This visual demonstrates a specialized surgical technique for total hip arthroplasty (THA) research, where components are implanted through the medial wall to preserve the entire native capsular ligamentous complex, facilitating the study of post-operative hip stability and range of motion.

Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Searching Images

femur anatomy anterior posterior view labeled neck head shaft condyles

This diagnostic visualization features two 3D anatomical reconstructions of a human femur, created from CT data using Mimics® software. The models demonstrate the full anatomy of the femur, including the femoral head, neck, greater and lesser trochanters, the diaphyseal shaft, and the distal condyles. The model on the left is presented in an anterior-posterior (coronal) view, while the model on the right is shown in a lateral (sagittal) view, highlighting significant anterior bowing of the femoral shaft. A key feature of these models is the visualization of the medullary canal, rendered as a semi-transparent, textured internal volume extending through the diaphysis to the distal metaphysis. This 3D representation is utilized in orthopedic surgical planning, specifically for analyzing femoral shaft bowing (FSB) and determining the mechanical axis (MA) to optimize component alignment in total knee arthroplasty (TKA) and revision surgeries.

This diagnostic visualization features two 3D anatomical reconstructions of a human femur, created from CT data using Mimics® software. The models demonstrate the full anatomy of the femur, including the femoral head, neck, greater and lesser trochanters, the diaphyseal shaft, and the distal condyles. The model on the left is presented in an anterior-posterior (coronal) view, while the model on the right is shown in a lateral (sagittal) view, highlighting significant anterior bowing of the femoral shaft. A key feature of these models is the visualization of the medullary canal, rendered as a semi-transparent, textured internal volume extending through the diaphysis to the distal metaphysis. This 3D representation is utilized in orthopedic surgical planning, specifically for analyzing femoral shaft bowing (FSB) and determining the mechanical axis (MA) to optimize component alignment in total knee arthroplasty (TKA) and revision surgeries.

Anatomical comparison chart showing various views of long bones (humerus, metacarpus, and femur). A–D illustrate a right humerus: (A) proximal view showing the rounded humeral head and articular surface; (B) posterior view; (C) anterior view displaying the deltoid tuberosity; and (D) distal view featuring the trochlea and capitulum. E–G display a right metacarpus: (E) proximal view showing the flat articular surface; (F) anterior view of the cylindrical shaft; and (G) distal view showing the articulating condyles. H–J show a left femur: (H) proximal view highlighting the femoral head, neck, and greater trochanter; (I) distal view showing the medial and lateral condyles separated by the intercondylar fossa; and (J) anterior view showing the length of the shaft and the lesser trochanter. The specimens are fossilized, exhibiting a dark brown, mineralized texture with visible surface cracking. A 5 cm scale bar is included for anatomical measurement. These images demonstrate musculoskeletal landmarks used in osteology and comparative anatomy for structural identification.

Anatomical comparison chart showing various views of long bones (humerus, metacarpus, and femur). A–D illustrate a right humerus: (A) proximal view showing the rounded humeral head and articular surface; (B) posterior view; (C) anterior view displaying the deltoid tuberosity; and (D) distal view featuring the trochlea and capitulum. E–G display a right metacarpus: (E) proximal view showing the flat articular surface; (F) anterior view of the cylindrical shaft; and (G) distal view showing the articulating condyles. H–J show a left femur: (H) proximal view highlighting the femoral head, neck, and greater trochanter; (I) distal view showing the medial and lateral condyles separated by the intercondylar fossa; and (J) anterior view showing the length of the shaft and the lesser trochanter. The specimens are fossilized, exhibiting a dark brown, mineralized texture with visible surface cracking. A 5 cm scale bar is included for anatomical measurement. These images demonstrate musculoskeletal landmarks used in osteology and comparative anatomy for structural identification.

This clinical photograph displays a labeled anterior view of a femur bone, highlighting anatomical landmarks and research parameters for densitometric analysis. The image is divided into three main longitudinal segments: the proximal metaphysis, the central diaphysis (shaft), and the distal metaphysis. Key anatomical landmarks identified with text labels include the femur head, femur neck, greater trochanter, lesser trochanter, and third trochanter at the proximal end, as well as the lateral and medial epicondyles at the distal end. A white rectangular box outlines the 'Densitometric region of interest (9mm²)' located within the distal metaphysis, specifically positioned between the epicondyles on the femoral condyles. The bone surface shows visible remnants of fibrous connective tissue. This anatomical diagram serves as a reference for standardize bone mineral density measurements in experimental osteopenia studies, illustrating the precise location where densitometry data is collected to evaluate bone quality and the effects of pharmaceutical interventions like doxycycline.

This clinical photograph displays a labeled anterior view of a femur bone, highlighting anatomical landmarks and research parameters for densitometric analysis. The image is divided into three main longitudinal segments: the proximal metaphysis, the central diaphysis (shaft), and the distal metaphysis. Key anatomical landmarks identified with text labels include the femur head, femur neck, greater trochanter, lesser trochanter, and third trochanter at the proximal end, as well as the lateral and medial epicondyles at the distal end. A white rectangular box outlines the 'Densitometric region of interest (9mm²)' located within the distal metaphysis, specifically positioned between the epicondyles on the femoral condyles. The bone surface shows visible remnants of fibrous connective tissue. This anatomical diagram serves as a reference for standardize bone mineral density measurements in experimental osteopenia studies, illustrating the precise location where densitometry data is collected to evaluate bone quality and the effects of pharmaceutical interventions like doxycycline.

Reading File
Note: BD Chaurasia (BDC) Vol 2 is not directly in the medical library database, but the same osteological content is covered authoritatively in the Imaging Anatomy Vol 3 (Saremi et al.) and THIEME General Anatomy & Musculoskeletal System Atlas - both of which follow the same landmark descriptions as BDC Vol 2 for the lower limb bones. The content below is organized exactly as BDC Vol 2 teaches these bones, covering all the same landmarks.

Lower Limb Bones - Landmarks for First Time Study


1. HIP BONE (Os Coxae / Innominate Bone)

Hip bone landmark diagram showing ASIS, PSIS, iliac crest, ischial tuberosity and pubic landmarks
The hip bone is formed by the fusion of three bones - ilium, ischium, and pubis - which meet at the acetabulum (the cup-shaped socket for the femoral head). The triradiate cartilage connecting them fuses between ages 13-18 years.

A. ILIUM (Upper Part - Fan-shaped)

LandmarkDescription & Importance
Iliac CrestUpper curved border of ilium, extending from ASIS to PSIS. Palpable along its full length. Site of bone marrow biopsy.
Anterior Superior Iliac Spine (ASIS)Anterior end of iliac crest. Origin of sartorius muscle and inguinal ligament attachment. Key landmark for measuring true leg length.
Anterior Inferior Iliac Spine (AIIS)Below ASIS. Origin of rectus femoris (straight head). Site of avulsion fracture in kicking sports.
Posterior Superior Iliac Spine (PSIS)Posterior end of iliac crest. Indicated by a "dimple" on skin (dimple of Venus). Lies opposite S2 vertebra.
Posterior Inferior Iliac Spine (PIIS)Below PSIS. Forms the upper margin of the greater sciatic notch.
Greater Sciatic NotchLarge notch below PSIS/PIIS. Transmits sciatic nerve, superior/inferior gluteal vessels and nerves, pudendal nerve.
Iliac FossaLarge concave medial surface of ilium. Contains iliacus muscle.
Iliac TuberosityRough area posterior to auricular surface. For interosseous sacroiliac ligaments.
Auricular SurfaceEar-shaped articular surface on medial ilium. Forms the sacroiliac joint.
Arcuate LineSmooth ridge running anteroinferiorly on medial ilium. Separates greater pelvis (above) from lesser pelvis (below). Forms part of pelvic brim.
Os coxae morphometric diagram showing landmark locations including ASIS, PSIS, ischial tuberosity and auricular surface

B. ISCHIUM (Posteroinferior Part)

LandmarkDescription & Importance
Ischial SpineSharp pointed projection. Separates greater sciatic notch (above) from lesser sciatic notch (below). Site of pudendal nerve block. Distance between ischial spines = bi-ischial diameter (obstetric importance).
Lesser Sciatic NotchBelow ischial spine. Converted to lesser sciatic foramen by sacrospinous ligament. Transmits tendon of obturator internus, pudendal nerve, and internal pudendal vessels on re-entry.
Ischial TuberosityLarge rough mass of bone posteroinferiorly. We sit on these. Origin of hamstrings (semitendinosus, semimembranosus, biceps femoris long head) and adductor magnus. Common site of avulsion injury.
Ischial RamusProjects anteriorly from ischial tuberosity to join inferior pubic ramus.
Obturator GrooveOn superior surface of ischial ramus. Contains obturator nerve and vessels.

C. PUBIS (Anteromedial Part)

LandmarkDescription & Importance
Pubic BodyMedial part that joins opposite pubis at pubic symphysis.
Pubic CrestUpper border of pubic body. Attachment of rectus abdominis and external oblique.
Pubic TubercleLateral end of pubic crest. Attachment of inguinal ligament medially. Key landmark for femoral and inguinal hernias.
Pecten Pubis (Pectineal Line)Sharp ridge on superior pubic ramus. Forms part of pelvic brim. Origin of pectineus muscle.
Superior Pubic RamusRuns from pubic body to iliopubic eminence.
Inferior Pubic RamusRuns from pubic body inferiorly to join ischial ramus.
Iliopubic (Iliopectineal) EminenceRounded elevation where ilium and pubis fuse (junction). Landmark on pelvic brim.
Obturator ForamenLarge oval foramen formed by pubis and ischium. Largely closed by obturator membrane.

D. ACETABULUM (Junction of all three bones)

LandmarkDescription & Importance
Acetabular FossaNon-articular central pit. Contains fat pad.
Lunate SurfaceArticular horseshoe-shaped surface. Covered by hyaline cartilage.
Acetabular NotchGap in inferior rim. Converted to acetabular foramen by transverse acetabular ligament.
Anterior/Posterior ColumnsStructural buttresses connecting acetabulum to axial skeleton through sciatic buttress. Critical in acetabular fracture classification.

2. FEMUR (Thigh Bone - Longest Bone in the Body)

Femur anatomy showing femoral head, neck, greater and lesser trochanters with labeled landmarks
The femur is divided into a proximal end, shaft (body), and distal end.

A. PROXIMAL FEMUR

LandmarkDescription & Importance
Femoral Head2/3 sphere. Articular cartilage covers it except at fovea. Ossification begins 4-10 months after birth.
Fovea CapitisSmall pit on femoral head. Attachment of ligamentum teres (round ligament). Carries artery to femoral head (small contribution).
Femoral NeckConnects head to shaft. Normal neck-shaft angle = 120-135° (coxa valga if >135°, coxa vara if <120°). Anteverted ~15° anteriorly. Most common site of osteoporotic hip fractures (intracapsular).
Greater TrochanterLarge bony prominence on lateral proximal femur. Palpable. Ossifies at 4 years. Site of: gluteus medius (superior), gluteus minimus (anterior), piriformis (medial surface). Location of greater trochanteric bursitis.
Lesser TrochanterConical projection posteromedially on proximal shaft. Ossifies at 11-12 years. Insertion of iliopsoas tendon.
Intertrochanteric LineRuns between greater and lesser trochanters ANTERIORLY. Capsule of hip joint attaches here. Iliofemoral ligament attaches anteriorly.
Intertrochanteric CrestRuns between greater and lesser trochanters POSTERIORLY. Has quadrate tubercle (insertion of quadratus femoris).
Trochanteric FossaDepression on medial surface of greater trochanter. Insertion of obturator internus and gemelli.
Calcar FemoraleDense vertical plate of cortical bone in posteromedial femoral neck. Provides structural support against compressive forces. Important in hip arthroplasty planning.

B. SHAFT (BODY) OF FEMUR

LandmarkDescription & Importance
Linea AsperaDouble ridge (medial and lateral lips) on posterior surface of femoral shaft. Major origin/insertion for thigh muscles. Medial lip continues as medial supracondylar line, lateral lip as lateral supracondylar line distally.
Gluteal TuberosityUpward continuation of medial lip of linea aspera. Insertion of gluteus maximus.
Pectineal LineLine on posterior surface between lesser trochanter and linea aspera. Insertion of pectineus.
Spiral LineRuns between intertrochanteric line and linea aspera anteriorly.
Nutrient ForamenOn posterior surface, directed upward (blood enters downward toward knee).

C. DISTAL FEMUR

LandmarkDescription & Importance
Medial CondyleLarger, projects more inferiorly. Articulates with medial tibial plateau.
Lateral CondyleSmaller, but wider anteroposteriorly. Articulates with lateral tibial plateau.
Medial EpicondyleBony projection above medial condyle. Attachment of medial (tibial) collateral ligament and origin of medial head of gastrocnemius.
Lateral EpicondyleAbove lateral condyle. Attachment of lateral (fibular) collateral ligament and origin of lateral head of gastrocnemius.
Adductor TubercleSmall prominence on medial epicondyle above. Insertion of adductor magnus.
Intercondylar (Popliteal) Notch/FossaDeep groove between condyles posteriorly. Contains ACL and PCL attachments.
Patellar Surface (Trochlea)Anterior groove between condyles. Articulates with patella. Prevents lateral patellar dislocation by lateral lip being higher.
Medial & Lateral Supracondylar LinesContinuations of linea aspera leading to epicondyles.
Popliteal SurfaceTriangular area on posterior distal femur above intercondylar notch. Floor of popliteal fossa.
Femur cross-section showing trabecular pattern in femoral head and neck with calcar femorale

3. TIBIA (Shin Bone - Second Largest Bone)

The tibia is located anteromedially in the leg. It is the weight-bearing bone of the leg. Divided into proximal, shaft, and distal parts.

A. PROXIMAL TIBIA

LandmarkDescription & Importance
Medial CondyleMedial mass at proximal end. Larger and oval-shaped. Articulates with medial femoral condyle via medial meniscus.
Lateral CondyleLateral mass at proximal end. Smaller. Articulates with lateral femoral condyle via lateral meniscus.
Medial Tibial PlateauFlat superior surface of medial condyle. Slightly concave.
Lateral Tibial PlateauFlat superior surface of lateral condyle. Slightly convex. Has 5-7° posterior slope.
Intercondylar EminenceCentral bony ridge between medial and lateral plateaus. Consists of medial and lateral intercondylar tubercles (spines).
Anterior Intercondylar AreaAnterior to eminence. Attachment of anterior horn of both menisci and ACL.
Posterior Intercondylar AreaPosterior to eminence. Attachment of posterior horns and PCL.
Tibial TuberosityBony prominence on anterior surface below condyles. Attachment of patellar tendon (quadriceps). Ossification center 8-14 years. Site of Osgood-Schlatter disease in adolescents.
Gerdy's TubercleOn anterolateral surface of lateral condyle. Insertion of iliotibial band.
Fibular Articular FacetOn posteroinferior lateral condyle. Articulates with fibular head (proximal tibiofibular joint).

B. SHAFT (BODY) OF TIBIA

LandmarkDescription & Importance
Anterior Border (Shin)Begins at tibial tuberosity, extends to anterior surface of medial malleolus. Sharp, subcutaneous and palpable its entire length.
Medial BorderExtends from medial condyle to posterior border of medial malleolus.
Interosseous (Lateral) BorderSharp border for attachment of interosseous membrane connecting to fibula.
Medial SurfaceBroad, flat, subcutaneous - no muscle covers it. "Shin" is palpable here.
Posterior SurfaceHas soleal line (oblique ridge) for origin of soleus muscle. Also has vertical ridge dividing surfaces for tibialis posterior origin.
Lateral SurfaceGives origin to extensor digitorum longus and peroneus (fibularis) tertius.
Soleal LineOblique line on posterior tibia. Origin of soleus. Nutrient foramen is just below and medial to it. Nutrient vessel directed downward (toward knee in tibia - opposite of femur).
Nutrient ForamenOn posterior surface below soleal line.

C. DISTAL TIBIA

LandmarkDescription & Importance
Medial MalleolusBony projection on medial side of ankle. Palpable subcutaneously. Articular facet medially for medial surface of talus. Attachment of deltoid ligament.
Fibular Notch (Incisura Fibulae)Groove on lateral side of distal tibia. Receives distal fibula to form tibiofibular syndesmosis.
Anterior Tibial TubercleMore prominent than posterior. Prevents forward slipping of fibula.
Posterior Tibial TubercleLess prominent. Allows limited posterior fibular motion.
Inferior Articular Surface (Tibial Plafond)Quadrilateral articular surface at ankle. Articulates with superior talar dome.
Groove for Flexor Hallucis LongusPosteromedially on distal tibia.

4. FIBULA (Non-Weight-Bearing Lateral Bone of Leg)

The fibula is a slender bone located posterolaterally in the leg. It does NOT contribute to weight-bearing (only ~17% indirectly through syndesmosis). Its main functions are muscle attachment and ankle joint stabilization.

A. PROXIMAL FIBULA

LandmarkDescription & Importance
Head of FibulaIrregular knob at proximal end. Palpable on posterolateral knee. Articular surface for proximal tibiofibular joint.
Apex (Styloid Process)Pointed projection at top of fibular head. Attachment of biceps femoris and fibular collateral ligament.
Articular Facet of HeadFaces anteromedially and slightly superiorly for tibial articulation.
NeckConstricted part just below head. Common peroneal (fibular) nerve winds around lateral side here - vulnerable to injury (foot drop).

B. SHAFT OF FIBULA

LandmarkDescription & Importance
Anterior BorderGives attachment to anterior intermuscular septum.
Posterior BorderGives attachment to posterior intermuscular septum.
Interosseous BorderMedial sharp border for interosseous membrane.
Medial Surface (Anterior)Origin of extensor digitorum longus, extensor hallucis longus, peroneus tertius.
Lateral Surface (Posterior)Origin of peroneus longus and brevis.
Posterior SurfaceOrigin of flexor hallucis longus, tibialis posterior.
Nutrient ForamenOn posterior surface. Directed downward (toward ankle).

C. DISTAL FIBULA (LATERAL MALLEOLUS)

LandmarkDescription & Importance
Lateral MalleolusMost distal part of fibula. Palpable prominently on lateral ankle. Projects more inferiorly (about 1 cm) than medial malleolus. This prevents lateral talus dislocation.
Articular SurfaceOn medial side of lateral malleolus. Triangular. Articulates with lateral facet of talus.
Malleolar FossaPosterior to articular surface on lateral malleolus. Contains posterior talofibular ligament and fibulocalcaneal ligament.
Anterior TubercleAttachment of anterior tibiofibular ligament.
Posterior Tubercle (Groove)Groove for peroneus (fibularis) brevis and longus tendons.
Distal Tibiofibular Joint (Syndesmosis)Fibrous joint between distal fibula and tibial incisura. Held by: anterior tibiofibular ligament (weakest), posterior tibiofibular ligament (strongest), transverse tibiofibular ligament, and interosseous ligament.
Tibia fibula labeled anatomy diagram showing tibial condyles, tibial tuberosity, and lateral malleolus

Quick Summary Table for Exam

BoneKey Proximal LandmarksKey Shaft LandmarksKey Distal Landmarks
Hip BoneASIS, AIIS, PSIS, PIIS, iliac crest, ischial spine, ischial tuberosity, pubic tubercleArcuate line, obturator foramen, acetabulumPubic symphysis
FemurHead, fovea capitis, neck, greater trochanter, lesser trochanter, intertrochanteric line/crestLinea aspera, gluteal tuberosity, pectineal line, nutrient foramenMedial/lateral condyles & epicondyles, adductor tubercle, intercondylar notch, patellar surface
TibiaMedial/lateral condyles, tibial plateaus, intercondylar eminence, tibial tuberosity, Gerdy's tubercleAnterior border (shin), soleal line, medial surface (subcutaneous), interosseous borderMedial malleolus, tibial plafond, fibular notch
FibulaHead, apex (styloid), neck (common peroneal nerve here)Anterior/posterior/interosseous borders, 3 surfacesLateral malleolus (1 cm below medial), malleolar fossa, syndesmosis

High-Yield Clinical Correlations

Clinical PointBoneLandmark Involved
Avascular necrosis after femoral neck fractureFemurFemoral head blood supply disrupted
Common peroneal nerve palsy (foot drop)FibulaNeck of fibula
Osgood-Schlatter diseaseTibiaTibial tuberosity apophysis
ASIS avulsion injury (sprinting, kicking)Hip boneASIS (sartorius origin)
AIIS avulsion (kicking)Hip boneAIIS (rectus femoris origin)
Pudendal nerve block landmarkHip boneIschial spine
Ischial tuberosity bursitis (Weaver's bottom)Hip boneIschial tuberosity
Ankle mortise widening (1 mm = significant instability)Fibula + TibiaSyndesmosis
True leg length measurementHip bone + FemurASIS to medial malleolus
Adductor tubercle - insertion of adductor magnusFemurMedial epicondyle region

Sources: Imaging Anatomy Text and Atlas Vol 3 - Bones, Joints, Vessels and Nerves (Saremi et al.); General Anatomy and Musculoskeletal System - THIEME Atlas of Anatomy. Content covers all landmarks as taught in BD Chaurasia Human Anatomy Vol 2 (Lower Limb).

Create a PDF quick reference card with labeled bone diagrams for easy exam study

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || echo "workspace empty or not created"

Running Command

mkdir -p /tmp/workspace/bone-ref-card && python3 -c "from reportlab.lib import colors; print('reportlab OK')"

Writing File

~/bone-ref-card/generate_pdf.py

#!/usr/bin/env python3
"""
Lower Limb Bones Quick Reference Card PDF
Hip Bone | Femur | Tibia | Fibula - BDC Vol 2 Landmarks
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import Flowable
from reportlab.pdfgen import canvas
import io

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_NAVY   = colors.HexColor("#1a2540")
MID_BLUE    = colors.HexColor("#2d5fa6")
ACCENT_TEAL = colors.HexColor("#1e8c8c")
ACCENT_GOLD = colors.HexColor("#d4a017")
ACCENT_RED  = colors.HexColor("#c0392b")
ACCENT_GRN  = colors.HexColor("#27ae60")
LIGHT_BG    = colors.HexColor("#f0f4fa")
TABLE_HDR   = colors.HexColor("#2d5fa6")
TABLE_ALT   = colors.HexColor("#eef3fb")
WHITE       = colors.white
LIGHT_GREY  = colors.HexColor("#f7f7f7")
MID_GREY    = colors.HexColor("#aaaaaa")

PAGE_W, PAGE_H = A4  # 595.27 x 841.89 pts

OUTPUT = "/tmp/workspace/bone-ref-card/Lower_Limb_Bones_Quick_Ref.pdf"

# ── Bone colours ─────────────────────────────────────────────────────────────
BONE_COLORS = {
    "Hip Bone": colors.HexColor("#8B4513"),   # saddle brown
    "Femur":    colors.HexColor("#2d5fa6"),   # blue
    "Tibia":    colors.HexColor("#27ae60"),   # green
    "Fibula":   colors.HexColor("#c0392b"),   # red
}

# ─────────────────────────────────────────────────────────────────────────────
# Custom Flowables
# ─────────────────────────────────────────────────────────────────────────────

class BoneDiagram(Flowable):
    """Hand-drawn-style schematic bone diagram using ReportLab canvas."""

    def __init__(self, bone_name, width=170*mm, height=200*mm):
        super().__init__()
        self.bone_name = bone_name
        self.width = width
        self.height = height

    def wrap(self, avail_w, avail_h):
        return self.width, self.height

    def draw(self):
        c = self.canv
        w, h = self.width, self.height
        cx = w / 2

        if self.bone_name == "Hip Bone":
            self._draw_hip_bone(c, cx, h)
        elif self.bone_name == "Femur":
            self._draw_femur(c, cx, h)
        elif self.bone_name == "Tibia":
            self._draw_tibia(c, cx, h)
        elif self.bone_name == "Fibula":
            self._draw_fibula(c, cx, h)

    # ── Drawing helpers ──────────────────────────────────────────────────────

    def _label(self, c, x, y, text, side="right", color=DARK_NAVY, size=6.5):
        c.setFont("Helvetica", size)
        c.setFillColor(color)
        if side == "right":
            c.drawString(x + 4, y - 3, text)
        else:
            tw = c.stringWidth(text, "Helvetica", size)
            c.drawString(x - tw - 4, y - 3, text)

    def _dot(self, c, x, y, r=2.5, color=ACCENT_GOLD):
        c.setFillColor(color)
        c.circle(x, y, r, fill=1, stroke=0)

    def _leader(self, c, x1, y1, x2, y2):
        c.setStrokeColor(MID_GREY)
        c.setLineWidth(0.5)
        c.line(x1, y1, x2, y2)

    # ── HIP BONE ─────────────────────────────────────────────────────────────
    def _draw_hip_bone(self, c, cx, h):
        bone_color = BONE_COLORS["Hip Bone"]
        c.setStrokeColor(bone_color)
        c.setFillColor(colors.HexColor("#f5e6d3"))
        c.setLineWidth(1.8)

        # Iliac crest (top arc)
        from reportlab.graphics.shapes import Path
        p = c.beginPath()
        p.moveTo(cx - 60, h - 30)           # left iliac crest start
        p.curveTo(cx - 80, h - 10,           # left curve up
                  cx + 80, h - 10,           # right curve up
                  cx + 60, h - 30)           # right end
        # Down to PSIS area
        p.curveTo(cx + 75, h - 55,
                  cx + 70, h - 80,
                  cx + 55, h - 100)          # posterior column
        # Sciatic notch area
        p.curveTo(cx + 50, h - 110,
                  cx + 60, h - 125,
                  cx + 45, h - 140)          # ischial spine
        p.curveTo(cx + 35, h - 155,
                  cx + 40, h - 170,
                  cx + 30, h - 185)          # ischial tuberosity
        # Inferior pubic ramus
        p.curveTo(cx + 10, h - 192,
                  cx - 10, h - 192,
                  cx - 25, h - 180)
        # Pubic area
        p.curveTo(cx - 40, h - 170,
                  cx - 45, h - 155,
                  cx - 55, h - 145)
        # Obturator foramen (we'll draw it separately)
        # Back up the anterior column
        p.curveTo(cx - 70, h - 120,
                  cx - 75, h - 90,
                  cx - 70, h - 60)
        p.curveTo(cx - 75, h - 45,
                  cx - 70, h - 35,
                  cx - 60, h - 30)
        c.drawPath(p, fill=1, stroke=1)

        # Acetabulum - circle on lateral surface (mid area)
        ac_x = cx + 15
        ac_y = h - 120
        c.setFillColor(colors.HexColor("#d4b896"))
        c.setStrokeColor(bone_color)
        c.setLineWidth(1.5)
        c.circle(ac_x, ac_y, 28, fill=1, stroke=1)
        # Acetabular notch (gap at bottom)
        c.setFillColor(colors.HexColor("#f5e6d3"))
        c.setLineWidth(0)
        c.rect(ac_x - 8, ac_y - 30, 16, 10, fill=1, stroke=0)
        # Lunate surface arc
        c.setStrokeColor(bone_color)
        c.setLineWidth(1)
        c.arc(ac_x - 22, ac_y - 22, ac_x + 22, ac_y + 22, startAng=20, extent=290)

        # Obturator foramen (oval)
        c.setFillColor(colors.HexColor("#ddd"))
        c.setStrokeColor(bone_color)
        c.setLineWidth(1.2)
        c.ellipse(cx - 30, h - 172, cx + 5, h - 148, fill=1, stroke=1)

        # ── Labels ──────────────────────────────────────────────────────────
        pts = [
            # (dot_x, dot_y, label, side)
            (cx,      h - 18,  "Iliac Crest",               "right"),
            (cx - 58, h - 30,  "ASIS",                      "left"),
            (cx - 62, h - 55,  "AIIS",                      "left"),
            (cx + 58, h - 30,  "PSIS",                      "right"),
            (cx + 55, h - 60,  "PIIS",                      "right"),
            (cx + 58, h - 112, "Greater Sciatic Notch",     "right"),
            (cx + 46, h - 140, "Ischial Spine",             "right"),
            (cx + 32, h - 185, "Ischial Tuberosity",        "right"),
            (cx - 12, h - 192, "Inf. Pubic Ramus",          "left"),
            (cx - 52, h - 148, "Pubic Tubercle",            "left"),
            (ac_x,    ac_y,    "Acetabulum",                "right"),
            (cx - 13, h - 160, "Obturator Foramen",         "left"),
            (cx - 55, h - 100, "Iliac Fossa",               "left"),
        ]
        for dx, dy, lbl, side in pts:
            self._dot(c, dx, dy)
            # leader line
            if side == "right":
                self._leader(c, dx + 2.5, dy, dx + 3, dy)
            else:
                self._leader(c, dx - 2.5, dy, dx - 3, dy)
            self._label(c, dx, dy, lbl, side)

    # ── FEMUR ────────────────────────────────────────────────────────────────
    def _draw_femur(self, c, cx, h):
        bone_color = BONE_COLORS["Femur"]
        fill_color = colors.HexColor("#d6e4f7")
        c.setStrokeColor(bone_color)
        c.setFillColor(fill_color)
        c.setLineWidth(1.8)

        # Head (circle at top-left, angled neck)
        head_x = cx - 30
        head_y = h - 28
        c.circle(head_x, head_y, 22, fill=1, stroke=1)
        # Fovea capitis
        c.setFillColor(colors.HexColor("#b8cde8"))
        c.circle(head_x, head_y, 5, fill=1, stroke=0)
        c.setFillColor(fill_color)

        # Neck (trapezoid connecting head to shaft)
        neck_path = c.beginPath()
        neck_path.moveTo(head_x + 15, head_y - 8)
        neck_path.lineTo(cx + 10, h - 65)
        neck_path.lineTo(cx + 22, h - 68)
        neck_path.lineTo(head_x + 20, head_y + 5)
        neck_path.close()
        c.setStrokeColor(bone_color)
        c.drawPath(neck_path, fill=1, stroke=1)

        # Greater trochanter (top right bump)
        gt_x = cx + 35
        gt_y = h - 60
        gt_path = c.beginPath()
        gt_path.moveTo(cx + 10, h - 60)
        gt_path.curveTo(cx + 15, h - 45, cx + 45, h - 40, gt_x + 10, h - 65)
        gt_path.curveTo(gt_x + 12, h - 75, gt_x, h - 80, cx + 20, h - 80)
        gt_path.close()
        c.drawPath(gt_path, fill=1, stroke=1)

        # Shaft (tapered rectangle)
        shaft_top_y = h - 80
        shaft_bot_y = h - 190
        c.setFillColor(fill_color)
        shaft_path = c.beginPath()
        shaft_path.moveTo(cx - 12, shaft_top_y)
        shaft_path.lineTo(cx - 14, shaft_bot_y + 20)
        shaft_path.lineTo(cx - 22, shaft_bot_y)
        shaft_path.lineTo(cx + 22, shaft_bot_y)
        shaft_path.lineTo(cx + 14, shaft_bot_y + 20)
        shaft_path.lineTo(cx + 15, shaft_top_y)
        shaft_path.close()
        c.drawPath(shaft_path, fill=1, stroke=1)

        # Lesser trochanter (medial bump at top of shaft)
        lt_x = cx - 22
        lt_y = h - 90
        lt_path = c.beginPath()
        lt_path.moveTo(cx - 12, h - 85)
        lt_path.curveTo(cx - 18, h - 88, cx - 32, h - 88, lt_x - 5, h - 96)
        lt_path.curveTo(lt_x - 5, h - 104, cx - 20, h - 100, cx - 12, h - 98)
        lt_path.close()
        c.drawPath(lt_path, fill=1, stroke=1)

        # Linea aspera (dashed line on posterior shaft)
        c.setStrokeColor(bone_color)
        c.setLineWidth(1.2)
        c.setDash([3, 2])
        c.line(cx + 5, shaft_top_y - 5, cx + 8, shaft_bot_y + 25)
        c.setDash([])

        # Distal condyles
        med_c_x = cx - 20
        lat_c_x = cx + 20
        dist_y   = shaft_bot_y
        c.setLineWidth(1.8)
        c.setFillColor(fill_color)
        # Medial condyle
        mc_path = c.beginPath()
        mc_path.moveTo(cx - 14, dist_y)
        mc_path.curveTo(cx - 14, dist_y - 12, cx - 35, dist_y - 12, cx - 35, dist_y - 5)
        mc_path.curveTo(cx - 35, dist_y + 8, cx - 14, dist_y + 5, cx - 14, dist_y)
        c.drawPath(mc_path, fill=1, stroke=1)
        # Lateral condyle
        lc_path = c.beginPath()
        lc_path.moveTo(cx + 14, dist_y)
        lc_path.curveTo(cx + 14, dist_y - 12, cx + 35, dist_y - 12, cx + 35, dist_y - 5)
        lc_path.curveTo(cx + 35, dist_y + 8, cx + 14, dist_y + 5, cx + 14, dist_y)
        c.drawPath(lc_path, fill=1, stroke=1)
        # Intercondylar notch
        c.setFillColor(colors.HexColor("#b8cde8"))
        c.ellipse(cx - 12, dist_y - 10, cx + 12, dist_y + 2, fill=1, stroke=0)

        # ── Labels ──────────────────────────────────────────────────────────
        pts = [
            (head_x,     head_y,       "Femoral Head",            "left"),
            (head_x,     head_y,       "Fovea Capitis (pit)",     "right"),
            (cx - 5,     h - 50,       "Femoral Neck",            "left"),
            (gt_x + 5,   gt_y - 10,    "Greater Trochanter",      "right"),
            (lt_x - 3,   lt_y - 2,     "Lesser Trochanter",       "left"),
            (cx + 10,    h - 72,       "Intertrochanteric Line",  "right"),
            (cx + 8,     h - 130,      "Linea Aspera (post.)",    "right"),
            (cx - 32,    dist_y - 5,   "Medial Condyle",          "left"),
            (cx + 32,    dist_y - 5,   "Lateral Condyle",         "right"),
            (cx - 35,    dist_y + 5,   "Medial Epicondyle",       "left"),
            (cx + 35,    dist_y + 5,   "Lateral Epicondyle",      "right"),
            (cx,         dist_y - 5,   "Intercondylar Fossa",     "right"),
        ]
        for dx, dy, lbl, side in pts:
            self._dot(c, dx, dy)
            self._label(c, dx, dy, lbl, side, size=6.2)

    # ── TIBIA ────────────────────────────────────────────────────────────────
    def _draw_tibia(self, c, cx, h):
        bone_color = BONE_COLORS["Tibia"]
        fill_color = colors.HexColor("#d4f0e0")
        c.setStrokeColor(bone_color)
        c.setFillColor(fill_color)
        c.setLineWidth(1.8)

        # Proximal expanded end
        prox_top = h - 25
        prox_bot = h - 70
        prox_path = c.beginPath()
        prox_path.moveTo(cx - 45, prox_bot)
        prox_path.curveTo(cx - 50, prox_top + 10, cx - 20, prox_top, cx, prox_top)
        prox_path.curveTo(cx + 20, prox_top, cx + 50, prox_top + 10, cx + 45, prox_bot)
        prox_path.lineTo(cx + 20, prox_bot)
        prox_path.lineTo(cx + 18, prox_bot - 8)
        prox_path.lineTo(cx - 18, prox_bot - 8)
        prox_path.lineTo(cx - 20, prox_bot)
        prox_path.close()
        c.drawPath(prox_path, fill=1, stroke=1)

        # Intercondylar eminence
        c.setFillColor(colors.HexColor("#a8dfc0"))
        em_path = c.beginPath()
        em_path.moveTo(cx - 10, prox_top + 2)
        em_path.curveTo(cx - 8, prox_top - 8, cx - 3, prox_top - 12, cx, prox_top - 15)
        em_path.curveTo(cx + 3, prox_top - 12, cx + 8, prox_top - 8, cx + 10, prox_top + 2)
        em_path.close()
        c.drawPath(em_path, fill=1, stroke=1)
        c.setFillColor(fill_color)

        # Tibial tuberosity (anterior bump)
        tt_y = h - 85
        tt_path = c.beginPath()
        tt_path.moveTo(cx - 18, prox_bot - 8)
        tt_path.curveTo(cx - 20, tt_y - 5, cx - 25, tt_y, cx - 22, tt_y + 10)
        tt_path.curveTo(cx - 18, tt_y + 18, cx - 12, tt_y + 15, cx - 12, prox_bot - 8)
        c.drawPath(tt_path, fill=1, stroke=1)

        # Shaft (slightly triangular cross-section feel)
        shaft_top = h - 88
        shaft_bot = h - 195
        shaft_path = c.beginPath()
        shaft_path.moveTo(cx - 14, shaft_top)
        shaft_path.lineTo(cx - 10, shaft_bot + 15)
        shaft_path.lineTo(cx - 18, shaft_bot)
        shaft_path.lineTo(cx + 14, shaft_bot)
        shaft_path.lineTo(cx + 10, shaft_bot + 15)
        shaft_path.lineTo(cx + 12, shaft_top)
        shaft_path.close()
        c.drawPath(shaft_path, fill=1, stroke=1)

        # Anterior border - sharp line
        c.setStrokeColor(colors.HexColor("#1a6640"))
        c.setLineWidth(2)
        c.line(cx - 22, tt_y + 10, cx - 14, shaft_bot + 15)
        c.setStrokeColor(bone_color)
        c.setLineWidth(1.8)

        # Soleal line (oblique, posterior)
        c.setStrokeColor(bone_color)
        c.setDash([4, 2])
        c.setLineWidth(1)
        c.line(cx + 5, shaft_top - 5, cx + 10, shaft_top - 38)
        c.setDash([])

        # Distal end
        dist_top = shaft_bot
        dist_bot = h - 218
        dist_path = c.beginPath()
        dist_path.moveTo(cx - 18, dist_top)
        dist_path.curveTo(cx - 22, dist_top - 8, cx - 28, dist_bot + 5, cx - 24, dist_bot)
        dist_path.lineTo(cx + 20, dist_bot)
        dist_path.curveTo(cx + 24, dist_bot + 5, cx + 18, dist_top - 8, cx + 14, dist_top)
        dist_path.close()
        c.drawPath(dist_path, fill=1, stroke=1)

        # Medial malleolus
        mm_path = c.beginPath()
        mm_path.moveTo(cx - 20, dist_bot + 3)
        mm_path.curveTo(cx - 28, dist_bot - 5, cx - 30, dist_bot - 12, cx - 22, dist_bot - 14)
        mm_path.curveTo(cx - 15, dist_bot - 15, cx - 12, dist_bot - 8, cx - 10, dist_bot)
        c.drawPath(mm_path, fill=1, stroke=1)

        # ── Labels ──────────────────────────────────────────────────────────
        pts = [
            (cx - 45, prox_top + 5,   "Medial Condyle",             "left"),
            (cx + 45, prox_top + 5,   "Lateral Condyle",            "right"),
            (cx,      prox_top - 15,  "Intercondylar Eminence",     "right"),
            (cx - 22, tt_y + 5,       "Tibial Tuberosity",          "left"),
            (cx - 22, shaft_top,      "Anterior Border (Shin)",     "left"),
            (cx + 10, shaft_top - 20, "Soleal Line (post.)",        "right"),
            (cx - 14, h - 140,        "Medial Surface (subcut.)",   "left"),
            (cx - 22, dist_bot - 8,   "Medial Malleolus",           "left"),
            (cx + 14, dist_top - 4,   "Fibular Notch",              "right"),
            (cx + 10, dist_bot + 2,   "Tibial Plafond",             "right"),
        ]
        for dx, dy, lbl, side in pts:
            self._dot(c, dx, dy, color=ACCENT_GRN)
            self._label(c, dx, dy, lbl, side, size=6.2)

    # ── FIBULA ───────────────────────────────────────────────────────────────
    def _draw_fibula(self, c, cx, h):
        bone_color = BONE_COLORS["Fibula"]
        fill_color = colors.HexColor("#fce8e6")
        c.setStrokeColor(bone_color)
        c.setFillColor(fill_color)
        c.setLineWidth(1.8)

        # Head (irregular knob)
        head_x = cx
        head_y = h - 30
        head_path = c.beginPath()
        head_path.moveTo(head_x - 18, head_y - 12)
        head_path.curveTo(head_x - 22, head_y + 2, head_x - 10, head_y + 12, head_x, head_y + 14)
        head_path.curveTo(head_x + 10, head_y + 12, head_x + 20, head_y + 5, head_x + 18, head_y - 8)
        head_path.curveTo(head_x + 14, head_y - 15, head_x + 8, head_y - 18, head_x, head_y - 18)
        head_path.curveTo(head_x - 10, head_y - 18, head_x - 16, head_y - 22, head_x - 18, head_y - 12)
        head_path.close()
        c.drawPath(head_path, fill=1, stroke=1)

        # Apex (styloid process - small spike on top)
        apex_path = c.beginPath()
        apex_path.moveTo(head_x - 5, head_y + 12)
        apex_path.lineTo(head_x - 10, head_y + 25)
        apex_path.lineTo(head_x + 5, head_y + 13)
        apex_path.close()
        c.drawPath(apex_path, fill=1, stroke=1)

        # Neck (constricted)
        neck_y_top = head_y - 18
        neck_y_bot = head_y - 38
        c.rect(cx - 9, neck_y_bot, 18, neck_y_top - neck_y_bot, fill=1, stroke=1)

        # Shaft (slender)
        shaft_top = h - 70
        shaft_bot = h - 190
        shaft_path = c.beginPath()
        shaft_path.moveTo(cx - 9, shaft_top)
        shaft_path.lineTo(cx - 8, shaft_bot + 20)
        shaft_path.lineTo(cx - 12, shaft_bot)
        shaft_path.lineTo(cx + 12, shaft_bot)
        shaft_path.lineTo(cx + 8, shaft_bot + 20)
        shaft_path.lineTo(cx + 9, shaft_top)
        shaft_path.close()
        c.drawPath(shaft_path, fill=1, stroke=1)

        # Lateral malleolus (distal expanded end)
        lm_top = shaft_bot
        lm_bot = h - 218
        lm_path = c.beginPath()
        lm_path.moveTo(cx - 12, lm_top)
        lm_path.curveTo(cx - 16, lm_top - 8, cx - 20, lm_bot + 8, cx - 18, lm_bot)
        lm_path.lineTo(cx + 18, lm_bot)
        lm_path.curveTo(cx + 22, lm_bot + 5, cx + 18, lm_top - 8, cx + 12, lm_top)
        lm_path.close()
        c.drawPath(lm_path, fill=1, stroke=1)

        # Malleolar fossa (posterior pit)
        c.setFillColor(colors.HexColor("#e8b0a8"))
        c.ellipse(cx + 6, lm_bot + 3, cx + 16, lm_bot + 12, fill=1, stroke=0)
        c.setFillColor(fill_color)

        # ── Labels ──────────────────────────────────────────────────────────
        pts = [
            (head_x - 10, head_y + 22, "Apex (Styloid Process)",    "left"),
            (head_x,      head_y,      "Head of Fibula",             "right"),
            (head_x,      head_y - 28, "Neck (common peroneal n.)",  "right"),
            (cx + 9,      shaft_top,   "Interosseous Border",        "right"),
            (cx - 9,      h - 110,     "Post. Surface (FHL, TP)",    "left"),
            (cx + 9,      h - 130,     "Lat. Surface (peroneals)",   "right"),
            (cx,          lm_top + 5,  "Lateral Malleolus",          "right"),
            (cx + 12,     lm_bot + 7,  "Malleolar Fossa",            "right"),
            (cx - 15,     lm_bot + 2,  "Articular Surface",          "left"),
            (cx,          lm_bot + 14, "Ant. Tubercle (ATFL)",       "right"),
        ]
        for dx, dy, lbl, side in pts:
            self._dot(c, dx, dy, color=ACCENT_RED)
            self._label(c, dx, dy, lbl, side, size=6.2)


# ─────────────────────────────────────────────────────────────────────────────
# Header Banner
# ─────────────────────────────────────────────────────────────────────────────
class HeaderBanner(Flowable):
    def __init__(self, width, height=42):
        super().__init__()
        self.width = width
        self.height = height

    def wrap(self, aw, ah):
        return self.width, self.height

    def draw(self):
        c = self.canv
        # Gradient-like banner
        c.setFillColor(DARK_NAVY)
        c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
        c.setFillColor(MID_BLUE)
        c.rect(0, 0, self.width * 0.6, self.height, fill=1, stroke=0)
        # Title text
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 16)
        c.drawString(10, self.height - 24, "LOWER LIMB BONES  —  QUICK REFERENCE CARD")
        c.setFont("Helvetica", 8)
        c.setFillColor(ACCENT_GOLD)
        c.drawString(10, 6, "Hip Bone  |  Femur  |  Tibia  |  Fibula  —  BDC Vol 2 Landmarks for Exam Study")


class SectionHeader(Flowable):
    def __init__(self, text, color, width=165*mm):
        super().__init__()
        self.text = text
        self.color = color
        self.width = width
        self.height = 18

    def wrap(self, aw, ah):
        return self.width, self.height

    def draw(self):
        c = self.canv
        c.setFillColor(self.color)
        c.roundRect(0, 0, self.width, self.height, 4, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 11)
        c.drawString(8, 4, self.text)


# ─────────────────────────────────────────────────────────────────────────────
# Table builder
# ─────────────────────────────────────────────────────────────────────────────
def make_landmark_table(rows, bone_color, col_widths=None):
    """rows: list of (landmark, description) tuples."""
    styles = getSampleStyleSheet()
    small = ParagraphStyle("small", fontSize=6.8, leading=9, fontName="Helvetica")
    bold_small = ParagraphStyle("boldsmall", fontSize=6.8, leading=9,
                                fontName="Helvetica-Bold")

    data = [["Landmark", "Description / Clinical Importance"]]
    for lm, desc in rows:
        data.append([
            Paragraph(lm, bold_small),
            Paragraph(desc, small),
        ])

    if col_widths is None:
        col_widths = [48*mm, 117*mm]

    t = Table(data, colWidths=col_widths, repeatRows=1)
    ts = TableStyle([
        ("BACKGROUND",   (0, 0), (-1, 0),  bone_color),
        ("TEXTCOLOR",    (0, 0), (-1, 0),  WHITE),
        ("FONTNAME",     (0, 0), (-1, 0),  "Helvetica-Bold"),
        ("FONTSIZE",     (0, 0), (-1, 0),  7.5),
        ("TOPPADDING",   (0, 0), (-1, 0),  3),
        ("BOTTOMPADDING",(0, 0), (-1, 0),  3),
        ("ROWBACKGROUNDS", (0, 1), (-1, -1), [WHITE, TABLE_ALT]),
        ("GRID",         (0, 0), (-1, -1),  0.4, colors.HexColor("#cccccc")),
        ("TOPPADDING",   (0, 1), (-1, -1),  2),
        ("BOTTOMPADDING",(0, 1), (-1, -1),  2),
        ("LEFTPADDING",  (0, 0), (-1, -1),  4),
        ("VALIGN",       (0, 0), (-1, -1),  "TOP"),
    ])
    t.setStyle(ts)
    return t


# ─────────────────────────────────────────────────────────────────────────────
# Content data
# ─────────────────────────────────────────────────────────────────────────────
HIP_ILIUM = [
    ("Iliac Crest",        "Curved upper border, ASIS to PSIS. Palpable throughout. Site of bone marrow biopsy. Subcutaneous throughout."),
    ("ASIS",               "Anterior Superior Iliac Spine. Origin of sartorius; medial attachment of inguinal ligament. True leg-length landmark. Avulsion in sprinters."),
    ("AIIS",               "Anterior Inferior Iliac Spine. Origin of rectus femoris (direct head). Avulsion in kicking sports."),
    ("PSIS",               "Posterior Superior Iliac Spine. Skin dimple (Dimple of Venus). Opposite S2 vertebra."),
    ("PIIS",               "Posterior Inferior Iliac Spine. Upper margin of greater sciatic notch."),
    ("Greater Sciatic Notch", "Between PIIS and ischial spine. Transmits sciatic nerve, superior/inferior gluteal vessels & nerves, pudendal nerve."),
    ("Iliac Fossa",        "Concave medial surface. Contains iliacus muscle."),
    ("Auricular Surface",  "Ear-shaped medial surface. Forms sacroiliac joint with sacrum."),
    ("Arcuate Line",       "Medial ridge. Separates greater (above) from lesser (below) pelvis. Part of pelvic brim."),
]

HIP_ISCHIUM = [
    ("Ischial Spine",      "Sharp projection between greater and lesser sciatic notches. Landmark for pudendal nerve block. Bi-ischial diameter = obstetric measure."),
    ("Lesser Sciatic Notch","Below ischial spine. Converted to foramen by sacrospinous ligament. Re-entry of pudendal nerve + internal pudendal vessels."),
    ("Ischial Tuberosity", "Large rough mass we sit on. Origin: hamstrings (semitendinosus, semimembranosus, biceps femoris LH) and adductor magnus. Avulsion common."),
    ("Ischial Ramus",      "Joins inferior pubic ramus below obturator foramen. Origin of obturator externus."),
]

HIP_PUBIS = [
    ("Pubic Body",         "Medial mass. Unites at pubic symphysis (fibrocartilage disc). Allows slight movement in pregnancy (relaxin effect)."),
    ("Pubic Crest",        "Upper border. Attachment of rectus abdominis, external oblique."),
    ("Pubic Tubercle",     "Lateral end of pubic crest. Medial attachment of inguinal ligament. Key hernia landmark."),
    ("Pecten Pubis",       "Sharp ridge on superior ramus. Part of pelvic brim. Origin of pectineus."),
    ("Iliopubic Eminence", "Rounded junction of ilium + pubis on pelvic brim."),
    ("Obturator Foramen",  "Large oval foramen (pubis + ischium). Mostly closed by obturator membrane. Obturator nerve and vessels pass through superior canal."),
]

HIP_ACETAB = [
    ("Acetabular Fossa",   "Non-articular central pit. Contains fat pad (Haversian gland) and ligamentum teres attachment."),
    ("Lunate Surface",     "Horseshoe-shaped articular cartilage. Bears weight through femoral head."),
    ("Acetabular Notch",   "Gap in inferior rim. Bridged by transverse acetabular ligament forming acetabular foramen (for vessels)."),
    ("Ant/Post Columns",   "Structural buttresses. Ant. column: iliopectineal line. Post. column: ilioischial line. Basis of Letournel acetabular fracture classification."),
]

FEMUR_PROX = [
    ("Femoral Head",       "2/3 sphere, articular cartilage. Blood supply: medial circumflex femoral (main), lateral circumflex femoral, obturator (ligamentum teres - minor). Disrupted in neck fractures → AVN."),
    ("Fovea Capitis",      "Small pit in head. Attachment of ligamentum teres. Small artery contribution from obturator."),
    ("Femoral Neck",       "Normal angle 120-135°. Anteversion ~15°. Intracapsular. Most common osteoporotic fracture. Blood supply enters via retinacular vessels."),
    ("Greater Trochanter", "Lateral prominence. Palpable. Ossifies age 4. Attachments: gluteus medius (sup), gluteus minimus (ant), piriformis (trochanteric fossa), obturator internus + gemelli (trochanteric fossa)."),
    ("Lesser Trochanter",  "Posteromedial conical projection. Ossifies 11-12 yrs. Insertion of iliopsoas (psoas major + iliacus). Avulsion in adolescents."),
    ("Intertrochanteric Line", "ANTERIOR. Joins trochanters anteriorly. Hip capsule attaches here. Iliofemoral ligament (Y ligament of Bigelow) attaches."),
    ("Intertrochanteric Crest","POSTERIOR. Has quadrate tubercle (insertion of quadratus femoris)."),
    ("Trochanteric Fossa", "Depression on medial greater trochanter. Obturator internus + gemelli insert."),
    ("Calcar Femorale",    "Dense cortical plate posteromedially in neck. Resists compressive forces. Critical in hip arthroplasty planning."),
]

FEMUR_SHAFT = [
    ("Linea Aspera",       "Double ridge (medial + lateral lip) on posterior shaft. Attachments of vastus medialis (medial lip), vastus lateralis (lateral lip), biceps femoris SH, adductors longus/brevis/magnus."),
    ("Gluteal Tuberosity", "Upward continuation of medial lip of linea aspera. Insertion of gluteus maximus."),
    ("Pectineal Line",     "Between lesser trochanter and linea aspera posteriorly. Insertion of pectineus."),
    ("Nutrient Foramen",   "Posterior surface, directed proximally (toward hip). Nutrient artery from profunda femoris."),
]

FEMUR_DIST = [
    ("Medial Condyle",     "Larger, projects more inferiorly. Articulates with medial tibial plateau. Longer radius of curvature."),
    ("Lateral Condyle",    "Smaller but wider A-P. Articulates with lateral tibial plateau. Has popliteal groove (popliteus tendon)."),
    ("Medial Epicondyle",  "Above medial condyle. MCL (tibial collateral ligament). Medial head of gastrocnemius origin."),
    ("Lateral Epicondyle", "Above lateral condyle. LCL (fibular collateral ligament). Lateral head of gastrocnemius origin."),
    ("Adductor Tubercle",  "Small eminence on medial epicondyle. Insertion of adductor magnus (tendinous part)."),
    ("Intercondylar Fossa","Posterior groove between condyles. ACL (lateral wall) and PCL (medial wall) attachments."),
    ("Patellar Surface",   "Anterior groove. Articulates with patella. Lateral lip higher → prevents lateral patellar dislocation."),
]

TIBIA_PROX = [
    ("Medial Condyle",     "Medial mass at proximal end. Oval. Slightly concave surface. Medial meniscus sits here."),
    ("Lateral Condyle",    "Lateral mass. Smaller. Slightly convex. Has facet for fibular head posteroinferiorly."),
    ("Tibial Plateau",     "Flat superior articular surfaces. 5-7° posterior slope (tibial slope). Medial: slightly concave. Lateral: slightly convex."),
    ("Intercondylar Eminence","Central bony ridge between plateaus. Medial + lateral intercondylar tubercles (spines). Anterior area: ACL + menisci. Posterior area: PCL."),
    ("Tibial Tuberosity",  "Anterior bump below condyles. Patellar tendon attachment (extensor mechanism). Ossifies 8-14 yrs. Osgood-Schlatter = traction apophysitis here."),
    ("Gerdy's Tubercle",   "Anterolateral surface of lateral condyle. Iliotibial band insertion."),
]

TIBIA_SHAFT = [
    ("Anterior Border",    "SHARP subcutaneous border from tibial tuberosity to anterior medial malleolus. Palpable throughout ('shin'). Site of stress fractures."),
    ("Medial Surface",     "Broad, flat, subcutaneous - no muscle cover. Directly under skin. Easily palpated."),
    ("Lateral (Interosseous) Border","Gives attachment to interosseous membrane connecting tibia to fibula."),
    ("Soleal Line",        "Oblique line on posterior surface. Origin of soleus muscle. Nutrient foramen just below (vessels directed downward - toward ankle, opposite femur)."),
    ("Vertical Posterior Ridge","Divides posterior surface. Medial: tibialis posterior. Lateral: flexor digitorum longus."),
]

TIBIA_DIST = [
    ("Medial Malleolus",   "Medial projection of distal tibia. Subcutaneous. Articular facet for medial talar surface. Deltoid ligament attachment. Extends lower than fibular malleolus."),
    ("Fibular Notch (Incisura Fibulae)","Lateral groove receiving distal fibula. Held by 4 syndesmotic ligaments. Even 1 mm widening of ankle mortise significantly reduces tibiotalar contact."),
    ("Tibial Plafond",     "Quadrilateral inferior articular surface. Articulates with superior talar dome. Key in pilon fractures."),
    ("Ant. Tibial Tubercle","More prominent - prevents anterior fibular slip."),
]

FIBULA_PROX = [
    ("Head",               "Irregular knob. Palpable posterolaterally at knee. Proximal tibiofibular joint. Biceps femoris and LCL attach to apex (styloid process)."),
    ("Apex (Styloid)",     "Pointed projection on head. Insertion of biceps femoris tendon and fibular collateral ligament."),
    ("Neck",               "Constricted part. COMMON PERONEAL (FIBULAR) NERVE winds around here → vulnerable to fracture/compression → foot drop."),
]

FIBULA_SHAFT = [
    ("Interosseous Border","Medial sharp border. Interosseous membrane attachment (with tibia). Transmits force to tibia."),
    ("Anterior Surface",   "Origin: extensor digitorum longus, extensor hallucis longus, peroneus (fibularis) tertius."),
    ("Lateral Surface",    "Origin: peroneus (fibularis) longus and brevis."),
    ("Posterior Surface",  "Origin: flexor hallucis longus, tibialis posterior."),
    ("Nutrient Foramen",   "On posterior surface. Directed downward (toward ankle)."),
]

FIBULA_DIST = [
    ("Lateral Malleolus",  "Most distal fibula. Palpable. Extends ~1 cm lower than medial malleolus - resists lateral talar dislocation. Most commonly fractured bone in ankle injuries."),
    ("Articular Surface",  "Triangular medial surface. Articulates with lateral facet of talus."),
    ("Malleolar Fossa",    "Posterior pit on lateral malleolus. Posterior talofibular ligament and calcaneofibular ligament attachments."),
    ("Syndesmosis",        "Distal tibiofibular fibrous joint. 4 ligaments: ATFL (weakest), PTFL (strongest), transverse tibfib lig, interosseous lig. Disruption = ankle instability."),
]

CLINICAL_PEARLS = [
    ("AVN of femoral head",        "Femoral neck fracture disrupts retinacular vessels → avascular necrosis"),
    ("Foot drop",                  "Common peroneal nerve at fibular neck → compression/fracture → loss of dorsiflexion + eversion"),
    ("Osgood-Schlatter disease",   "Tibial tuberosity apophysitis in adolescent athletes due to patellar tendon traction"),
    ("ASIS avulsion",              "Sartorius origin. Sprinting. AIIS avulsion = rectus femoris origin. Kicking."),
    ("Pudendal nerve block",       "Landmark: ischial spine (palpated transvaginally or per rectum)"),
    ("Ankle mortise widening",     "1 mm widening of tibiofibular syndesmosis = 42% reduction in tibiotalar contact → instability + OA"),
    ("True leg length",            "Measured ASIS to medial malleolus (apparent = umbilicus to medial malleolus)"),
    ("Weaver's bottom (ischial bursitis)", "Inflammation of ischial bursa over ischial tuberosity"),
    ("Coxa valga / vara",          "Femoral neck-shaft angle: normal 120-135°. Valga >135°, vara <120°"),
    ("Calcar femorale",            "Dense posteromedial femoral neck cortex - guides prosthesis positioning in THA"),
]


# ─────────────────────────────────────────────────────────────────────────────
# PDF build
# ─────────────────────────────────────────────────────────────────────────────
def build_pdf():
    doc = SimpleDocTemplate(
        OUTPUT,
        pagesize=A4,
        leftMargin=12*mm,
        rightMargin=12*mm,
        topMargin=10*mm,
        bottomMargin=10*mm,
        title="Lower Limb Bones Quick Reference - BDC Vol 2",
        author="Orris Medical"
    )

    styles = getSampleStyleSheet()
    sub_hdr = ParagraphStyle("sub_hdr", fontSize=8, fontName="Helvetica-Bold",
                             textColor=DARK_NAVY, spaceBefore=4, spaceAfter=2)
    tiny = ParagraphStyle("tiny", fontSize=6.5, fontName="Helvetica", leading=9)
    note_style = ParagraphStyle("note", fontSize=6, fontName="Helvetica-Oblique",
                                textColor=colors.grey, leading=8)

    content = []

    # Header
    content.append(HeaderBanner(PAGE_W - 24*mm))
    content.append(Spacer(1, 4*mm))

    # ── PAGE 1: Hip Bone ─────────────────────────────────────────────────────
    hb_color = BONE_COLORS["Hip Bone"]

    content.append(SectionHeader("1.  HIP BONE (Os Coxae / Innominate Bone)", hb_color))
    content.append(Spacer(1, 2*mm))

    # Two-column layout: diagram left, intro text right
    intro_text = (
        "Formed by fusion of <b>ilium</b> (upper fan), <b>ischium</b> (posteroinferior), and "
        "<b>pubis</b> (anteromedial), meeting at the <b>acetabulum</b>. Triradiate cartilage "
        "fuses 13-18 yrs. Right + left hip bones + sacrum + coccyx = bony pelvis."
    )
    intro_para = Paragraph(intro_text, ParagraphStyle("intro", fontSize=7.5, leading=10,
                                                       fontName="Helvetica"))

    diag_cell = BoneDiagram("Hip Bone", width=75*mm, height=195*mm)
    text_content = [
        [intro_para],
        [Spacer(1, 2*mm)],
        [Paragraph("<b>ILIUM</b>", sub_hdr)],
        [make_landmark_table(HIP_ILIUM, hb_color, col_widths=[35*mm, 81*mm])],
        [Spacer(1, 1.5*mm)],
        [Paragraph("<b>ISCHIUM</b>", sub_hdr)],
        [make_landmark_table(HIP_ISCHIUM, hb_color, col_widths=[35*mm, 81*mm])],
        [Spacer(1, 1.5*mm)],
        [Paragraph("<b>PUBIS</b>", sub_hdr)],
        [make_landmark_table(HIP_PUBIS, hb_color, col_widths=[35*mm, 81*mm])],
        [Spacer(1, 1.5*mm)],
        [Paragraph("<b>ACETABULUM</b>", sub_hdr)],
        [make_landmark_table(HIP_ACETAB, hb_color, col_widths=[35*mm, 81*mm])],
    ]

    # Flatten text content into a single column
    from reportlab.platypus import KeepInFrame
    inner_col = []
    for row in text_content:
        inner_col.append(row[0])

    layout = Table(
        [[diag_cell, inner_col]],
        colWidths=[77*mm, 92*mm],
    )
    layout.setStyle(TableStyle([
        ("VALIGN",      (0, 0), (-1, -1), "TOP"),
        ("LEFTPADDING", (0, 0), (-1, -1), 0),
        ("RIGHTPADDING",(0, 0), (-1, -1), 2),
        ("TOPPADDING",  (0, 0), (-1, -1), 0),
        ("BOTTOMPADDING",(0,0), (-1, -1), 0),
    ]))
    # Note: Reportlab doesn't allow list as cell; put inner items in a separate table
    # Use a nested Table for the text column
    text_rows = [[item] for item in inner_col]
    text_tbl = Table(text_rows, colWidths=[92*mm])
    text_tbl.setStyle(TableStyle([
        ("LEFTPADDING",  (0, 0), (-1, -1), 0),
        ("RIGHTPADDING", (0, 0), (-1, -1), 0),
        ("TOPPADDING",   (0, 0), (-1, -1), 0),
        ("BOTTOMPADDING",(0, 0), (-1, -1), 0),
    ]))

    layout2 = Table([[diag_cell, text_tbl]], colWidths=[77*mm, 95*mm])
    layout2.setStyle(TableStyle([
        ("VALIGN",       (0, 0), (-1, -1), "TOP"),
        ("LEFTPADDING",  (0, 0), (-1, -1), 0),
        ("RIGHTPADDING", (0, 0), (-1, -1), 2),
        ("TOPPADDING",   (0, 0), (-1, -1), 0),
        ("BOTTOMPADDING",(0, 0), (-1, -1), 0),
    ]))
    content.append(layout2)
    content.append(Spacer(1, 3*mm))

    # ── PAGE 2: Femur ────────────────────────────────────────────────────────
    content.append(HRFlowable(width="100%", thickness=1, color=MID_GREY))
    content.append(Spacer(1, 2*mm))
    fem_color = BONE_COLORS["Femur"]
    content.append(SectionHeader("2.  FEMUR  (Longest, Heaviest Bone in the Body)", fem_color))
    content.append(Spacer(1, 2*mm))

    fem_intro = Paragraph(
        "Consists of a <b>proximal end</b> (head, neck, trochanters), a <b>shaft</b> (body), and "
        "a <b>distal end</b> (condyles, epicondyles). Directed obliquely downward and medially "
        "forming the anatomical axis of the lower limb. Neck-shaft angle ~127°, anteversion ~15°.",
        ParagraphStyle("intro", fontSize=7.5, leading=10, fontName="Helvetica")
    )

    fem_inner = [
        fem_intro, Spacer(1, 2*mm),
        Paragraph("<b>PROXIMAL FEMUR</b>", sub_hdr),
        make_landmark_table(FEMUR_PROX, fem_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>SHAFT OF FEMUR</b>", sub_hdr),
        make_landmark_table(FEMUR_SHAFT, fem_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>DISTAL FEMUR</b>", sub_hdr),
        make_landmark_table(FEMUR_DIST, fem_color, col_widths=[35*mm, 81*mm]),
    ]
    fem_rows = [[item] for item in fem_inner]
    fem_tbl = Table(fem_rows, colWidths=[92*mm])
    fem_tbl.setStyle(TableStyle([
        ("LEFTPADDING", (0,0),(-1,-1), 0),("RIGHTPADDING",(0,0),(-1,-1),0),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))

    fem_diag = BoneDiagram("Femur", width=75*mm, height=210*mm)
    fem_layout = Table([[fem_diag, fem_tbl]], colWidths=[77*mm, 95*mm])
    fem_layout.setStyle(TableStyle([
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),2),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    content.append(fem_layout)
    content.append(Spacer(1, 3*mm))

    # ── PAGE 3: Tibia + Fibula ───────────────────────────────────────────────
    content.append(HRFlowable(width="100%", thickness=1, color=MID_GREY))
    content.append(Spacer(1, 2*mm))

    tib_color = BONE_COLORS["Tibia"]
    fib_color = BONE_COLORS["Fibula"]

    # Tibia
    content.append(SectionHeader("3.  TIBIA  (Second Largest Bone — Weight-bearing)", tib_color))
    content.append(Spacer(1, 2*mm))

    tib_intro = Paragraph(
        "Located <b>anteromedially</b> in the leg. Bears ~85% of body weight. "
        "Has a <b>triangular cross-section</b> in mid-shaft with anterior border (shin) as the "
        "subcutaneous apex. Articulates with femur (above), fibula (both ends), and talus (below).",
        ParagraphStyle("intro", fontSize=7.5, leading=10, fontName="Helvetica")
    )
    tib_inner = [
        tib_intro, Spacer(1, 2*mm),
        Paragraph("<b>PROXIMAL TIBIA</b>", sub_hdr),
        make_landmark_table(TIBIA_PROX, tib_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>SHAFT OF TIBIA</b>", sub_hdr),
        make_landmark_table(TIBIA_SHAFT, tib_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>DISTAL TIBIA</b>", sub_hdr),
        make_landmark_table(TIBIA_DIST, tib_color, col_widths=[35*mm, 81*mm]),
    ]
    tib_rows = [[item] for item in tib_inner]
    tib_tbl = Table(tib_rows, colWidths=[92*mm])
    tib_tbl.setStyle(TableStyle([
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    tib_diag = BoneDiagram("Tibia", width=75*mm, height=200*mm)
    tib_layout = Table([[tib_diag, tib_tbl]], colWidths=[77*mm, 95*mm])
    tib_layout.setStyle(TableStyle([
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),2),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    content.append(tib_layout)
    content.append(Spacer(1, 3*mm))

    # Fibula
    content.append(HRFlowable(width="100%", thickness=0.5, color=MID_GREY))
    content.append(Spacer(1, 2*mm))
    content.append(SectionHeader("4.  FIBULA  (Non-Weight-bearing Lateral Bone)", fib_color))
    content.append(Spacer(1, 2*mm))

    fib_intro = Paragraph(
        "Slender bone, <b>posterolateral</b> to tibia. Provides <b>no weight-bearing</b> directly "
        "but stabilizes ankle mortise via syndesmosis. Main functions: muscle attachment, "
        "ankle stability. Common peroneal nerve at neck is a critical landmark.",
        ParagraphStyle("intro", fontSize=7.5, leading=10, fontName="Helvetica")
    )
    fib_inner = [
        fib_intro, Spacer(1, 2*mm),
        Paragraph("<b>PROXIMAL FIBULA</b>", sub_hdr),
        make_landmark_table(FIBULA_PROX, fib_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>SHAFT OF FIBULA</b>", sub_hdr),
        make_landmark_table(FIBULA_SHAFT, fib_color, col_widths=[35*mm, 81*mm]),
        Spacer(1, 1.5*mm),
        Paragraph("<b>DISTAL FIBULA</b>", sub_hdr),
        make_landmark_table(FIBULA_DIST, fib_color, col_widths=[35*mm, 81*mm]),
    ]
    fib_rows = [[item] for item in fib_inner]
    fib_tbl = Table(fib_rows, colWidths=[92*mm])
    fib_tbl.setStyle(TableStyle([
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    fib_diag = BoneDiagram("Fibula", width=75*mm, height=200*mm)
    fib_layout = Table([[fib_diag, fib_tbl]], colWidths=[77*mm, 95*mm])
    fib_layout.setStyle(TableStyle([
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),2),
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    content.append(fib_layout)
    content.append(Spacer(1, 4*mm))

    # ── CLINICAL PEARLS ──────────────────────────────────────────────────────
    content.append(HRFlowable(width="100%", thickness=1.5, color=ACCENT_GOLD))
    content.append(Spacer(1, 2*mm))

    pearl_hdr = SectionHeader("HIGH-YIELD CLINICAL PEARLS  — Exam Focus", ACCENT_GOLD)
    content.append(pearl_hdr)
    content.append(Spacer(1, 2*mm))

    pearl_style_b = ParagraphStyle("pb", fontSize=7, fontName="Helvetica-Bold",
                                   textColor=DARK_NAVY)
    pearl_style   = ParagraphStyle("p",  fontSize=7, fontName="Helvetica", leading=9)

    pearl_data = [["Clinical Scenario", "Key Landmark / Anatomy Point"]]
    for scenario, point in CLINICAL_PEARLS:
        pearl_data.append([
            Paragraph(scenario, pearl_style_b),
            Paragraph(point, pearl_style),
        ])

    pearl_tbl = Table(pearl_data, colWidths=[65*mm, 105*mm])
    pearl_tbl.setStyle(TableStyle([
        ("BACKGROUND",   (0,0), (-1,0),  ACCENT_GOLD),
        ("TEXTCOLOR",    (0,0), (-1,0),  DARK_NAVY),
        ("FONTNAME",     (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",     (0,0), (-1,0),  7.5),
        ("TOPPADDING",   (0,0), (-1,0),  3),
        ("BOTTOMPADDING",(0,0), (-1,0),  3),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, colors.HexColor("#fffbef")]),
        ("GRID",         (0,0), (-1,-1), 0.4, colors.HexColor("#dddddd")),
        ("TOPPADDING",   (0,1), (-1,-1), 2),
        ("BOTTOMPADDING",(0,1), (-1,-1), 2),
        ("LEFTPADDING",  (0,0), (-1,-1), 4),
        ("VALIGN",       (0,0), (-1,-1), "TOP"),
    ]))
    content.append(pearl_tbl)
    content.append(Spacer(1, 3*mm))

    # ── SUMMARY COMPARISON TABLE ─────────────────────────────────────────────
    content.append(SectionHeader("QUICK COMPARISON — All Four Bones at a Glance", MID_BLUE))
    content.append(Spacer(1, 2*mm))

    summary_hdr_style = ParagraphStyle("sh", fontSize=7, fontName="Helvetica-Bold",
                                       textColor=WHITE)
    cell_style = ParagraphStyle("cs", fontSize=6.5, fontName="Helvetica", leading=8.5)

    summary_data = [
        ["Bone", "Proximal Landmark(s)", "Shaft Landmark(s)", "Distal Landmark(s)"],
        ["Hip Bone",
         "ASIS, AIIS, PSIS, PIIS\nIliac crest, Ischial spine\nIschial tuberosity, Pubic tubercle",
         "Arcuate line, Obturator foramen\nAcetabulum (3-bone junction)\nIliac fossa",
         "Pubic symphysis\nPecten pubis\nObturator groove"],
        ["Femur",
         "Femoral head + fovea capitis\nFemoral neck, Greater trochanter\nLesser trochanter\nIntertrochanteric line/crest",
         "Linea aspera (post.)\nGluteal tuberosity\nPectineal line\nNutrient foramen",
         "Medial + lateral condyles\nMedial + lateral epicondyles\nAdductor tubercle\nIntercondylar fossa"],
        ["Tibia",
         "Med + lat condyles\nTibial plateaus\nIntercondylar eminence\nTibial tuberosity, Gerdy's tubercle",
         "Anterior border (shin)\nMedial surface (subcutaneous)\nSoleal line (post.)\nInterosseous border",
         "Medial malleolus\nTibial plafond\nFibular notch\nAnt + post tibial tubercles"],
        ["Fibula",
         "Head + apex (styloid)\nNeck (common peroneal nerve!)",
         "Interosseous border\n3 surfaces (ant, lat, post)\nNutrient foramen (→ ankle)",
         "Lateral malleolus\n(1 cm below medial malleolus)\nMalleolar fossa\nSyndesmosis"],
    ]

    col_w = [25*mm, 50*mm, 48*mm, 49*mm]
    sum_tbl = Table(summary_data, colWidths=col_w)
    sum_tbl.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,0),  MID_BLUE),
        ("TEXTCOLOR",     (0,0), (-1,0),  WHITE),
        ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0), (-1,0),  7.5),
        ("BACKGROUND",    (0,1), (0,1),   colors.HexColor("#f5e6d3")),
        ("BACKGROUND",    (0,2), (0,2),   colors.HexColor("#d6e4f7")),
        ("BACKGROUND",    (0,3), (0,3),   colors.HexColor("#d4f0e0")),
        ("BACKGROUND",    (0,4), (0,4),   colors.HexColor("#fce8e6")),
        ("FONTNAME",      (0,1), (0,-1),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,1), (-1,-1), 6.5),
        ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#bbbbbb")),
        ("TOPPADDING",    (0,0), (-1,-1), 3),
        ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ("LEFTPADDING",   (0,0), (-1,-1), 4),
        ("VALIGN",        (0,0), (-1,-1), "TOP"),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),  [colors.HexColor("#ffffff"),
                                           colors.HexColor("#f4f8ff")]),
    ]))
    content.append(sum_tbl)
    content.append(Spacer(1, 2*mm))

    # Footer note
    content.append(Paragraph(
        "Sources: Imaging Anatomy Vol 3 (Saremi et al.) | THIEME General Anatomy & Musculoskeletal System Atlas | "
        "BD Chaurasia Human Anatomy Vol 2  |  Prepared by Orris Medical",
        note_style
    ))

    # ── Page numbering ────────────────────────────────────────────────────────
    def add_page_number(canvas_obj, doc_obj):
        canvas_obj.saveState()
        canvas_obj.setFont("Helvetica", 7)
        canvas_obj.setFillColor(MID_GREY)
        page_num = f"Page {doc_obj.page}"
        canvas_obj.drawRightString(PAGE_W - 12*mm, 6*mm, page_num)
        canvas_obj.drawString(12*mm, 6*mm, "Lower Limb Bones Quick Reference  |  BDC Vol 2")
        canvas_obj.restoreState()

    doc.build(content, onFirstPage=add_page_number, onLaterPages=add_page_number)
    print(f"PDF created: {OUTPUT}")


if __name__ == "__main__":
    build_pdf()
Running Command

cd /tmp/workspace/bone-ref-card && python3 generate_pdf.py 2>&1

Running Command

python3 -c " from pypdf import PdfReader r = PdfReader('/tmp/workspace/bone-ref-card/Lower_Limb_Bones_Quick_Ref.pdf') print(f'Pages: {len(r.pages)}') import os size = os.path.getsize('/tmp/workspace/bone-ref-card/Lower_Limb_Bones_Quick_Ref.pdf') print(f'File size: {size/1024:.1f} KB') "

Your PDF quick reference card is ready:

Lower Limb Bones Quick Ref

PDF Document · PDF


What's inside (5 pages, A4):
Page(s)Content
1Hip Bone - schematic diagram with labeled ASIS/AIIS/PSIS/PIIS/iliac crest/ischial spine/tuberosity/acetabulum/obturator foramen + full landmark tables for Ilium, Ischium, Pubis, Acetabulum
2Femur - diagram with head/neck/trochanters/linea aspera/condyles labeled + tables for proximal, shaft, distal femur
3Tibia - diagram with tibial tuberosity/anterior border/malleolus labeled + proximal/shaft/distal tables
4Fibula - diagram with head/neck/lateral malleolus labeled + proximal/shaft/distal tables
5High-yield Clinical Pearls (AVN, foot drop, Osgood-Schlatter, etc.) + Quick Comparison Table of all 4 bones side-by-side
Each bone section has a color code: Hip Bone = brown, Femur = blue, Tibia = green, Fibula = red - making it easy to flip between bones at a glance during revision.

Absecess of rt vulva

Reading File
Finding Sources
Finding Sources
Searching Images

Bartholin gland abscess vulva clinical appearance

**Modality:** Ultrasonography (Grayscale)
**Anatomical Region:** Vulva / Perineal soft tissue

**Description:**
The image displays a grayscale ultrasound of the vulvar region. Centered within the field of view is a well-circumscribed, predominantly hypoechoic mass measuring approximately 2.9 × 2.5 × 2.1 cm. The internal echo texture of the lesion is heterogeneous, containing subtle internal echoes and areas of low-level echogenicity. 

**Characteristic Visual Features:**
*   **Margination:** The borders of the mass appear relatively distinct from the surrounding subcutaneous tissue.
*   **Echogenicity:** The lesion is hypoechoic compared to the adjacent fibroadipose tissue.
*   **Acoustic Features:** There is evidence of posterior acoustic enhancement, suggesting a fluid-filled or highly cellular cystic nature, often associated with lesions such as a Bartholin’s gland cyst or abscess.
*   **Artifacts:** Significant posterior acoustic shadowing is absent; however, lateral edge shadowing is visible at the margins of the mass.

**Clinical Significance:**
Findings are consistent with a localized vulvar mass or cyst. The appearance requires differentiation between inflammatory processes (e.g., abscess), benign cystic lesions (e.g., Bartholin's cyst), or solid soft tissue neoplasms.

**Modality:** Ultrasonography (Grayscale) **Anatomical Region:** Vulva / Perineal soft tissue **Description:** The image displays a grayscale ultrasound of the vulvar region. Centered within the field of view is a well-circumscribed, predominantly hypoechoic mass measuring approximately 2.9 × 2.5 × 2.1 cm. The internal echo texture of the lesion is heterogeneous, containing subtle internal echoes and areas of low-level echogenicity. **Characteristic Visual Features:** * **Margination:** The borders of the mass appear relatively distinct from the surrounding subcutaneous tissue. * **Echogenicity:** The lesion is hypoechoic compared to the adjacent fibroadipose tissue. * **Acoustic Features:** There is evidence of posterior acoustic enhancement, suggesting a fluid-filled or highly cellular cystic nature, often associated with lesions such as a Bartholin’s gland cyst or abscess. * **Artifacts:** Significant posterior acoustic shadowing is absent; however, lateral edge shadowing is visible at the margins of the mass. **Clinical Significance:** Findings are consistent with a localized vulvar mass or cyst. The appearance requires differentiation between inflammatory processes (e.g., abscess), benign cystic lesions (e.g., Bartholin's cyst), or solid soft tissue neoplasms.

Clinical photograph of a vulvar mass, specifically ectopic mammary gland-like tissue (EMGLT), captured during a surgical procedure. The image depicts a 2 cm irregular, nodular mass located on the right vulva at the labia minora juncture. The lesion exhibits a pinkish-red, erythematous color with a rough, multinodular surface texture. Some areas show pale protrusions and signs of recent biopsy instrumentation. The surrounding vulvar skin appears tanned and more regular in texture compared to the focal pathology. A gloved hand is visible at the top and left, retracting the tissue for visualization, while blue surgical draping is seen in the background. This image serves to illustrate the clinical appearance of accessory breast tissue located along the embryonic milk line, demonstrating why it may be mistaken for other vulvar neoplasms like Bartholin gland cysts or hidradenoma papilliferum.

Clinical photograph of a vulvar mass, specifically ectopic mammary gland-like tissue (EMGLT), captured during a surgical procedure. The image depicts a 2 cm irregular, nodular mass located on the right vulva at the labia minora juncture. The lesion exhibits a pinkish-red, erythematous color with a rough, multinodular surface texture. Some areas show pale protrusions and signs of recent biopsy instrumentation. The surrounding vulvar skin appears tanned and more regular in texture compared to the focal pathology. A gloved hand is visible at the top and left, retracting the tissue for visualization, while blue surgical draping is seen in the background. This image serves to illustrate the clinical appearance of accessory breast tissue located along the embryonic milk line, demonstrating why it may be mistaken for other vulvar neoplasms like Bartholin gland cysts or hidradenoma papilliferum.

This clinical photograph displays a gross surgical specimen of an excised vulvar tumor, later histologically confirmed as a desmoid tumor (aggressive fibromatosis). The specimen is a solid, irregularly shaped, and lobulated mass with a predominantly pinkish-tan, fleshy appearance. Its surface is moist and glistening, revealing a dense, fibrous texture with visible fascicular striations across the parenchyma. There is no clear evidence of a distinct capsule, which correlates with the infiltrative growth pattern typical of desmoid fibromatosis and the clinical report of a difficult dissection with an absent cleavage plane. The mass shows focal areas of congestion and small irregular voids. This image illustrates the macroscopic features of a mesenchymal tumor arising from the deep soft tissues of the vulva, emphasizing the non-encapsulated, fibrous nature that distinguishes aggressive fibromatosis from simple cysts of the Bartholin gland.

This clinical photograph displays a gross surgical specimen of an excised vulvar tumor, later histologically confirmed as a desmoid tumor (aggressive fibromatosis). The specimen is a solid, irregularly shaped, and lobulated mass with a predominantly pinkish-tan, fleshy appearance. Its surface is moist and glistening, revealing a dense, fibrous texture with visible fascicular striations across the parenchyma. There is no clear evidence of a distinct capsule, which correlates with the infiltrative growth pattern typical of desmoid fibromatosis and the clinical report of a difficult dissection with an absent cleavage plane. The mass shows focal areas of congestion and small irregular voids. This image illustrates the macroscopic features of a mesenchymal tumor arising from the deep soft tissues of the vulva, emphasizing the non-encapsulated, fibrous nature that distinguishes aggressive fibromatosis from simple cysts of the Bartholin gland.

Reading File
Reading File
Reading File
Loading Image
Reading File
Reading File
I now have everything needed for a comprehensive answer. Let me also fetch the hemostat procedure illustration.
Bartholin gland anatomy and abscess - normal location at 5 and 7 o'clock in the posterior vestibule (Panel A), and appearance of a Bartholin gland abscess (Panel B)

Abscess of the Right Vulva (Bartholin Gland Abscess)


Anatomy & Pathophysiology

The Bartholin glands (greater vestibular glands) are two pea-sized mucus-secreting glands located bilaterally in the labia minora. Their ducts open into the posterior vestibule at the 4 o'clock and 8 o'clock positions (classically described as 5 and 7 o'clock in some texts). They become active at puberty, secreting moisture to the vestibule, and involute with age.
Pathogenesis:
  • Obstruction of the Bartholin duct → mucus accumulates → cyst forms
  • Secondary infection of the cyst/gland → abscess
  • A pre-existing cyst is NOT required - abscesses can arise de novo from duct obstruction + infection
  • Presents as a unilateral (in this case, right-sided) painful vulvar mass
Microbiology - typically polymicrobial:
OrganismFrequency
E. coliMost common isolate
AnaerobesCommon (polymicrobial)
N. gonorrhoeaeLess common; must consider in STI context
Chlamydia trachomatisLess common
MRSAIncreasingly reported

Risk Factors

  • Reproductive age women (peak incidence)
  • Occurs in ~2% of women
  • Diabetes mellitus
  • Obesity
  • Immunosuppression
  • Pregnancy
  • Trauma / prior vulvar surgery

Clinical Features

FeatureDescription
LocationPosterior introitus, right side - at the 5 o'clock position
PainExquisitely tender, often severe; worsens with walking, sitting
SwellingFluctuant mass, variable size - may become very large
Skin changesOverlying erythema, induration, local warmth
Systemic symptomsFever and chills are rarely present (unlike deeper infections)
OnsetDevelops over several days (faster than a cyst alone)
Labia minora positionLabia minora transects the abscess - a classic identifying feature
Key distinction: A right vulvar abscess of the labia majora (not Bartholin's) requires gynaecologic consultation rather than ED management.

Diagnosis

  • Clinical - history + examination is usually sufficient
  • Ultrasound - confirms discrete hypoechoic fluid collection when diagnosis is uncertain; useful to distinguish from solid mass, cellulitis, or labia majora abscess
  • Swab/culture - send pus for MC&S including gonorrhoea and chlamydia
  • Biopsy - indicated if solid components present or malignancy suspected (especially in women >40 years, as Bartholin gland carcinoma can mimic a cyst/abscess)
Important: In women aged >40, biopsy the wall of a Bartholin "cyst" or abscess to exclude Bartholin gland carcinoma. About 10% of Bartholin gland carcinomas have a prior history of inflammation.

Differential Diagnosis of Right Vulvar Swelling

ConditionDistinguishing Features
Bartholin duct cystNon-tender, soft, posterior vestibule
Labial abscess (non-Bartholin)Labia majora, does NOT transect labia minora
Hidradenitis suppurativaChronic, recurrent, sinus tracts, apocrine glands, inguinal folds
Vulvar Crohn's disease"Knife-cut ulcerations," perianal involvement, history of Crohn's
Necrotizing fasciitisRapidly spreading, systemic sepsis, crepitus, disproportionate pain
Sebaceous/epidermal inclusion cystAnterior labia majora, non-tender
Inguinal herniaReducible, impulse on cough
Bartholin gland carcinomaSolid, irregular, age >40, does not resolve

Treatment

Step 1 - Is the abscess ready for drainage?

Incision and drainage should only be performed when the abscess is a well-defined, walled-off, fluctuant structure. If not yet defined: prescribe broad-spectrum antibiotics + analgesics + warm sitz baths + short-term follow-up.
General rule: A vulvar abscess >2 cm will typically require surgical intervention.

Step 2 - Choose the drainage method

Option A: Word Catheter (First-line, preferred in ED)
A Word catheter is a #10 Foley-sized catheter with a short (1-inch) stem and an inflatable balloon. It maintains a tract, allowing epithelialization and reducing recurrence.
Procedure:
  1. Position patient in dorsal lithotomy with feet in stirrups
  2. Premedicate - IV opioids ± sedation (propofol, etomidate, or benzodiazepine); nitrous oxide is acceptable
  3. Clean area with antiseptic solution
  4. Inject local anaesthetic (2% lidocaine, 25-27 gauge needle) through the mucosal surface (NOT through skin)
  5. Stab incision with #11 scalpel on the mucosal surface of the vestibule (just lateral to hymenal ring, at the point of greatest fluctuance)
  6. Incision should be small - just large enough for catheter but not so large the balloon extrudes
  7. Alternatively - skewer the abscess onto a hemostat (held steady while the abscess is pushed onto it - easier technique)
  8. Entry confirmed by a palpable "pop" or free flow of pus
  9. Insert Word catheter to the hilt, inflate balloon with 2-4 mL of saline/water (25-gauge needle)
  10. Tuck free end of catheter into vagina
  11. Leave in place 4-6 weeks to allow a fistula tract to epithelialize
Option B: Marsupialization (Definitive surgical procedure)
Indicated for:
  • Recurrent Bartholin abscess
  • Abscess too large for Word catheter
  • Patient preference for definitive treatment
Technique: An elliptical wedge of skin is excised to create a permanent opening; the cyst/abscess wall is sutured to the skin edges, creating a new drainage tract.
Option C: Excision of Bartholin gland
Indicated for:
  • Repeated recurrences after marsupialization
  • Suspected malignancy
  • Postmenopausal women (involuted gland)

Step 3 - Antibiotics

ScenarioAntibiotic
After I&D (no risk factors)Not routinely required post-drainage
Pre-drainage / poorly-defined abscessBroad-spectrum (e.g., amoxicillin-clavulanate)
Risk of N. gonorrhoeae/C. trachomatisAdd ceftriaxone + doxycycline
MRSA riskAdd trimethoprim-sulfamethoxazole or clindamycin
Significant surrounding cellulitisSystemic antibiotics warranted
Immunocompromised / diabetic / systemically unwellAdmit, IV antibiotics, gynaecology consult

Step 4 - Special situations requiring Gynaecology referral

  • Very large abscess / distorted anatomy
  • Uncertain diagnosis
  • Significant cellulitis
  • Immunocompromised patient
  • Unstable vital signs / sepsis
  • Bleeding dyscrasia
  • Abscess of labia majora (not Bartholin's)
  • Suspicion of malignancy
  • Vulvar necrotizing fasciitis (emergency surgical debridement)

Necrotizing Fasciitis of the Vulva - Red Flags (Surgical Emergency)

This is a life-threatening complication to never miss:
  • Rapidly spreading erythema beyond the initial swelling
  • Disproportionate pain relative to skin findings
  • Crepitus (gas in tissues)
  • Systemic sepsis (high fever, hypotension, tachycardia)
  • Skin necrosis / purplish discoloration
  • High risk patients: diabetics, tobacco users, postoperative / postpartum
Management: Immediate IV broad-spectrum antibiotics + emergency surgical debridement (multidisciplinary).

Follow-up & Recurrence

TreatmentRecurrence Rate
Simple I&D alone (no catheter)High
Word catheter I&D~10-15%
Marsupialization~5-10% (lowest)
ExcisionLowest, but highest morbidity
Recurrent abscess patients should be referred to gynaecology for marsupialization or excision.

Ultrasound Appearance

Ultrasound of vulvar mass - well-circumscribed hypoechoic lesion with posterior acoustic enhancement consistent with Bartholin abscess
A Bartholin abscess on ultrasound appears as a well-circumscribed hypoechoic mass with heterogeneous internal echoes, posterior acoustic enhancement (fluid-filled), and distinct margins from surrounding tissue - as shown above.

Sources: Roberts & Hedges' Clinical Procedures in Emergency Medicine; Tintinalli's Emergency Medicine; Sabiston Textbook of Surgery 21st ed.
This is a shared conversation. Sign in to Orris to start your own chat.