Hi guys,

Thanks for your suggestions. Here’s my MATLAB function. Solving for R:

R=S/(2*sin(theta/2))

```
function [ tract_tortuosity ] = tract_tortuosity_radius( track_file )
% return the average step-to-step curvature radius in mm averaged across all tracks
tracks = read_mrtrix_tracks(track_file); % mrtrix matlab code to read .tck
track_count = str2double(tracks.count);
track_curvature_radii = zeros(1,track_count);
step_size = tracks.step_size;
% for each track in the file
for track_number = 1:track_count
track = tracks.data{1,track_number};
track_step_count = size(track,1);
track_step_angles_curvature_radii = zeros(2,track_step_count-1);
% for each step in the track
for step_number = 1:track_step_count-2
% get two vectors
point1 = track(step_number,:);
point2 = track(step_number+1,:);
point3 = track(step_number+2,:);
step1 = point2 - point1;
step2 = point3 - point2;
angle_radians = atan2(norm(cross(step1,step2)),dot(step1,step2));
radius_of_curvature = step_size/(2*sin(angle_radians/2));
track_step_angles_curvature_radii(1,step_number) = angle_radians;
track_step_angles_curvature_radii(2,step_number) = radius_of_curvature;
end
track_curvature_radii(1,track_number) = mean(track_step_angles_curvature_radii(2,:));
end
tract_tortuosity = mean(track_curvature_radii);
end
```

I tested these three tracts for curvature radius (similar numbers of tracks and lengths):

I tested the tracts at step lengths from 1 to 35 mm (downsampled using `tckresample`

). Here are the average radii for each tract at various step lengths (colours matching tracts as above):

Here are the radii and angles (in radians) for every track in the blue tract for step length=1 (x-axis is steps):

It looks like the tracts are best distinguished at step lengths > 5mm. For very long step lengths, many details are lost (for example 35mm sampling in the fig below), but the method still seems to work regardless. I think I’ll choose a step length between 5 and 10 mm and use that.

Cheers - Tom