Trajectory calculation for stereotaxic frames

I will do the work. i need some time, a couple of weeks. I´m a neurosurgeon with a lot of work

2 Likes

dear @JBeninca:
for my respect.
it’s rare to see a neurosurgeon can coding slicer in china , my work is to integrate all usefull and convenient slicer plugin into a package for neurosurgeon,your work is very valuable for me to keep tracing,thank you very much.

@jay1987 looking at your frame CT, it looks like your Y-axis is flipped (something I never considered in my implementation).

@JBeninca no need to rewrite code for the Leksell. You can see my implementation here: trajectoryGuideModules/frameDetect.py at main · greydongilmore/trajectoryGuideModules · GitHub. The specific class I wrote for detecting the N-localizers is here: trajectoryGuideModules/helpers.py at 9c6f99226c4f42e01d88e26badd4b48b79aa0884 · greydongilmore/trajectoryGuideModules · GitHub.

I’m happy to help out in any way.

1 Like

thank you very much @Greydon_Gilmore

accounting for the flip in the Y-axis I am able to obtain the following segmentation from your CT:

You’ll notice some drop-out near the bottom of the N-localizer due to weak localizer signal. However, you do not need all points to calculate Frame coordinates so this won’t affect accuracy. The other thing I’ve noticed is that your frame CT is not centered (the x,y,z axes should be centered on 100). Did you apply a transform to the image prior to sharing?

that’s correct ! @Greydon_Gilmore
could you please integrate these piece of code in your trajectoryGuideModules?that’s very useful!!

A best way for Leksell frame. You can use Fiducial Registration module to register the CT data with the prepared points .

yes,it’s work!
but i need to find the x,y,z position and three angles relative to the leksell frame .

It is easy,when you adjust the XYZ frame and RAS to be parallel, it can be obtained by simple calculation. Regarding the angle, it can be obtained by the arctangent function.
1661257411293

I understand what you mean,but i dont have a leksell headframe , i can’t judge the result what i caculate , the recent value i get is about 5 degree off to the correct result what i send to my doctor friend to evaluate

Do you have the module, maybe I can provide you with the CT data or I can help you test it.

Yes , please @jay1987, if you can send one or more leksell framed - patient CT scan data , I ´ll will be thankfull

this is a tc with leksell arc: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free