ENH: Fixed bug in Line Distance. Modified the code to calculate inverse matrix before passing an affine transform to 3D Slicer.