So, this is a image of a patient who had self-inflicted himself. But he doesn't have any tendon injury or nerve injury as such, but he only has tingling sensation. He already has a transverse scar. So, I want to explore the ulnar nerve. So, what incision can I take? So, should I take a vertical incision or should I continue with the transverse incision and extend it proximally and distally?
ulnar nerve wrist laceration
ulnar nerve exploration wrist laceration surgical incision scar extension Guyon canal
https://www.orthoracle.com/library/guyons-canal-release
How should I map the ulnar nerve and artery before exploration?
ultrasound ulnar nerve wrist
ulnar nerve artery wrist ultrasound mapping Guyon canal preoperative
Can you give a diagrammatic representation of how to explore, uh, like the exploratory incision, uh, to the photo that, that I have, uh, given? I want to see it. I want to see it somehow. Yeah, wait though.
Annotate the provided image with a proposed incision
~/
Guyon canal ulnar nerve exploration volar ulnar wrist incision surgical approach
mkdir -p "/tmp/workspace/ulnar-incision-annotation/output" && python -c "from PIL import Image, ImageDraw, ImageFont; import os, math; src='/tmp/workspace/attachments/49eb2913-d4d3-4c1f-ba0b-29fd551a4e3e/bf989228-b159-4962-98fa-4ad38f97d31a.jpeg'; im=Image.open(src).convert('RGB'); d=ImageDraw.Draw(im); W,H=im.size; font='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf'; f=ImageFont.truetype(font,32); fs=ImageFont.truetype(font,25); # translucent labels\ndef label(x,y,text,fill):\n bb=d.textbbox((x,y),text,font=f); d.rounded_rectangle((bb[0]-10,bb[1]-7,bb[2]+10,bb[3]+7),radius=8,fill=(255,255,255),outline=fill,width=3); d.text((x,y),text,font=f,fill=fill)\n# intended curve: proximal normal ulnar-volar forearm to distal Guyon area, drawn dashed red\npts=[(620,1660),(610,1560),(605,1460),(612,1370),(625,1290),(646,1215),(685,1155),(730,1118)]\n# interpolate and dash\nfor a,b in zip(pts,pts[1:]):\n dx=b[0]-a[0]; dy=b[1]-a[1]; L=(dx*dx+dy*dy)**.5; ux=dx/L; uy=dy/L\n pos=0\n while pos<L:\n e=min(pos+24,L); d.line([(a[0]+ux*pos,a[1]+uy*pos),(a[0]+ux*e,a[1]+uy*e)],fill=(210,25,35),width=12); pos+=39\n# arrows / labels\nlabel(55,1110,'Proposed curvilinear / longitudinal exposure',(180,20,25)); d.line([(510,1145),(675,1190)],fill=(180,20,25),width=4); d.polygon([(675,1190),(652,1176),(657,1205)],fill=(180,20,25))\nlabel(45,1390,'Existing transverse scar',(15,80,165)); d.line([(430,1420),(620,1385)],fill=(15,80,165),width=4); d.polygon([(620,1385),(598,1378),(603,1402)],fill=(15,80,165))\n# add legend panel\npanel=(30,35,1090,185); d.rounded_rectangle(panel,radius=18,fill=(255,255,255),outline=(40,40,40),width=3); d.text((55,55),'Educational surface planning only: final line must follow US/Doppler mapping',font=fs,fill=(20,20,20)); d.text((55,100),'of ulnar nerve and artery, scar quality, and intraoperative findings.',font=fs,fill=(20,20,20)); d.line([(60,155),(155,155)],fill=(210,25,35),width=10); d.text((175,137),'planned exposure',font=fs,fill=(20,20,20)); d.line([(440,155),(535,155)],fill=(15,80,165),width=8); d.text((555,137),'old scar',font=fs,fill=(20,20,20)); out='/tmp/workspace/ulnar-incision-annotation/output/ulnar_volar_exploration_proposed_overlay.jpg'; im.save(out,quality=95); print(out, im.size)"
fc-match -f '%{file}\n' 'DejaVu Sans' | sed -n '1p'
python -c "from PIL import Image, ImageDraw, ImageFont; src='/tmp/workspace/attachments/49eb2913-d4d3-4c1f-ba0b-29fd551a4e3e/bf989228-b159-4962-98fa-4ad38f97d31a.jpeg'; im=Image.open(src).convert('RGB'); d=ImageDraw.Draw(im); font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf'; f=ImageFont.truetype(font,32); fs=ImageFont.truetype(font,25);\ndef label(x,y,text,fill):\n bb=d.textbbox((x,y),text,font=f); d.rounded_rectangle((bb[0]-10,bb[1]-7,bb[2]+10,bb[3]+7),radius=8,fill=(255,255,255),outline=fill,width=3); d.text((x,y),text,font=f,fill=fill)\npts=[(620,1660),(610,1560),(605,1460),(612,1370),(625,1290),(646,1215),(685,1155),(730,1118)]\nfor a,b in zip(pts,pts[1:]):\n dx=b[0]-a[0]; dy=b[1]-a[1]; L=(dx*dx+dy*dy)**.5; ux=dx/L; uy=dy/L; pos=0\n while pos<L:\n e=min(pos+24,L); d.line([(a[0]+ux*pos,a[1]+uy*pos),(a[0]+ux*e,a[1]+uy*e)],fill=(210,25,35),width=12); pos+=39\nlabel(55,1110,'Proposed curvilinear / longitudinal exposure',(180,20,25)); d.line([(510,1145),(675,1190)],fill=(180,20,25),width=4); d.polygon([(675,1190),(652,1176),(657,1205)],fill=(180,20,25))\nlabel(45,1390,'Existing transverse scar',(15,80,165)); d.line([(430,1420),(620,1385)],fill=(15,80,165),width=4); d.polygon([(620,1385),(598,1378),(603,1402)],fill=(15,80,165))\npanel=(30,35,1090,185); d.rounded_rectangle(panel,radius=18,fill=(255,255,255),outline=(40,40,40),width=3); d.text((55,55),'Educational surface planning only: final line must follow US/Doppler mapping',font=fs,fill=(20,20,20)); d.text((55,100),'of ulnar nerve and artery, scar quality, and intraoperative findings.',font=fs,fill=(20,20,20)); d.line([(60,155),(155,155)],fill=(210,25,35),width=10); d.text((175,137),'planned exposure',font=fs,fill=(20,20,20)); d.line([(440,155),(535,155)],fill=(15,80,165),width=8); d.text((555,137),'old scar',font=fs,fill=(20,20,20)); out='/tmp/workspace/ulnar-incision-annotation/output/ulnar_volar_exploration_proposed_overlay.jpg'; im.save(out,quality=95); print(out,im.size)"
~/ulnar-incision-annotation/annotate.py
from PIL import Image, ImageDraw, ImageFont
src = '/tmp/workspace/attachments/49eb2913-d4d3-4c1f-ba0b-29fd551a4e3e/bf989228-b159-4962-98fa-4ad38f97d31a.jpeg'
out = '/tmp/workspace/ulnar-incision-annotation/output/ulnar_volar_exploration_proposed_overlay.jpg'
im = Image.open(src).convert('RGB')
d = ImageDraw.Draw(im)
font_path = '/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf'
f = ImageFont.truetype(font_path, 32)
fs = ImageFont.truetype(font_path, 25)
def label(x, y, text, color):
box = d.textbbox((x, y), text, font=f)
d.rounded_rectangle((box[0]-10, box[1]-7, box[2]+10, box[3]+7), radius=8, fill=(255,255,255), outline=color, width=3)
d.text((x, y), text, font=f, fill=color)
# Proposed line: proximal unscarred ulnar-volar forearm, curving to ulnar palm/Guyon region.
pts = [(620,1660),(610,1560),(605,1460),(612,1370),(625,1290),(646,1215),(685,1155),(730,1118)]
for a, b in zip(pts, pts[1:]):
dx, dy = b[0]-a[0], b[1]-a[1]
length = (dx*dx + dy*dy) ** 0.5
ux, uy = dx/length, dy/length
pos = 0
while pos < length:
end = min(pos+24, length)
d.line([(a[0]+ux*pos, a[1]+uy*pos), (a[0]+ux*end, a[1]+uy*end)], fill=(210,25,35), width=12)
pos += 39
label(55, 1110, 'Proposed curvilinear / longitudinal exposure', (180,20,25))
d.line([(510,1145),(675,1190)], fill=(180,20,25), width=4)
d.polygon([(675,1190),(652,1176),(657,1205)], fill=(180,20,25))
label(45, 1390, 'Existing transverse scar', (15,80,165))
d.line([(430,1420),(620,1385)], fill=(15,80,165), width=4)
d.polygon([(620,1385),(598,1378),(603,1402)], fill=(15,80,165))
panel=(30,35,1090,185)
d.rounded_rectangle(panel, radius=18, fill=(255,255,255), outline=(40,40,40), width=3)
d.text((55,55), 'Educational surface planning only: final line must follow US/Doppler mapping', font=fs, fill=(20,20,20))
d.text((55,100), 'of ulnar nerve and artery, scar quality, and intraoperative findings.', font=fs, fill=(20,20,20))
d.line([(60,155),(155,155)], fill=(210,25,35), width=10)
d.text((175,137), 'planned exposure', font=fs, fill=(20,20,20))
d.line([(440,155),(535,155)], fill=(15,80,165), width=8)
d.text((555,137), 'old scar', font=fs, fill=(20,20,20))
im.save(out, quality=95)
print(out)
python "/tmp/workspace/ulnar-incision-annotation/annotate.py" && ls -lh "/tmp/workspace/ulnar-incision-annotation/output/ulnar_volar_exploration_proposed_overlay.jpg"

ulnar volar exploration proposed overlay
Image · JPG