Job Jar/Streamline library

From VrlWiki
Jump to navigation Jump to search

Tubegen represents streamlines/tubes in several different formats in memory and on disk, and this format is distinct from the representations used by well-established third parties, for example FSL, Camino, and DTK. The core of any representation, though, is quite simple: a collection of streamlines, in which each streamline is just an ordered list of vertex points in 3-space. The tricky bit is that we want to be able to associate scalars with these datasets at many levels:

  • the whole collection (for example, the average length of the streamlines)
  • each individual streamline (ex: the length of the streamline)
  • each segment of each streamline (ex: distance to the nearest segment; color values related to the orientation of the segment)
  • each vertex point of each streamline (ex: the interpolated FA value at that point)

The data format should also include a description (say, a string) for each scalar value so that its interpretation is unambiguous.

This job jar task is to create a C++ library to represent this sort of data in memory, provide a useful program interface for interacting with it (based on standard types such as STL containers and possible standard C arrays), and to read from and write to all of the four formats listed above (Tubegen, FSL, Camino, and DTK).

The DTK streamline format is excellently designed and would be a great starting point. It already fulfills most of the data representation requirements listed above (with the exception of per-segment scalars) but is based on a pretty gnarly C struct representation. Rewriting this in C++ and adding the appropriate I/O and interface functions would pretty much fulfill this job description.

Matlab I/O code would also be very useful but is less essential.

Jadrian has already written a lot of code to do this kind of thing, so it might make sense to talk to him and leverage his work in the process of creating this library. Cagatay also works with streamlines a lot and would probably have useful input.


Implementation

See $G/common/libcurvecollection for implementation