Line profile in MRI image

Hello,
How i compute and plot image intensity profile along a line in MRI image?
I try Sandbox but it didn’t work for MRI image.
Thanks in advance.