How to compute the shortest distance between the end of streamline and the cerebral cortex

Dear MRtrix Experts,
I’m trying to calculate the distance between the end of several streamline and the cerebral cortex, but it’s quite hard for me to correctly figure out :smiling_face_with_tear:
Until now, I only know that tckresample -endpoints may helps me get the coordinate of the endpoint, but I don’t know how to continue, hopes that I could get some suggestions or reference from you, which would really really helps me a lot!!! :sparkling_heart: :sparkling_heart:

1 Like