Libcurvecollection
The Curve Collection Library (libcurvecollection) provides a representation streamlines/curves in memory and an interface to access this information in a convenient but memory-safe manner. It can also read and write to disk, freely converting between several file formats.
Currently, the supported formats are:
- DTK/TrackVis
- Tubegen's custom format (.data and .nocr files)
- CCF
Introduction
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)
Some of the data formats also include a description (i.e., a string) for each scalar value.
libcurvecollection provides a unified interface for handling these various formats, while simplifying access to the information in memory by presenting it in a object-oriented fashion.
Structure
The library consists of three mutually dependent components, each with a header (.h) and a .cpp file: