Hi Jonathan,
Thank you for the interest in the DTI blog!
While I highly doubt that a TRK -> STL converter exists at the moment, both file formats are very well-defined, and it should be relatively easy to write a program that can read in the .trk, perform some basic computations, and write out an STL file.
The TRK format is basically a set of n "tracks" containing m points. At each point, you have three float values x/y/z to represent the location of this point along the track in space, along withn_s additional scalars that can be associated with this point (such as the FA, MD, or other scalar DTI metrics).
In the STL file format, you create a set of "vertices" with v_x, v_y, v_z to define the location of each vertex in space. These are arranged in triplets to create a "facet," which is a small triangle, and a set of "facets" make up a "solid," which is some surface that can be rendered (by rendering these individual little triangles).
It might not be trivial, but you can try to translate the x/y/z points along each track into cylindrical surfaces in STL.
Best of luck,
-Sam Hurley
Distinguished Graduate Fellow
University of Wisconsin - Madison