ENH: Draw 3D streamlines in 2D views
This MR adds a new visualisation option for tractogram
overlays. The Pseudo-3D checkbox (--pseudo3D
on the command-line) is available on orthographic and lightbox views, and causes the tractogram to be rendered in the same manner as for the 3D view. This is in contrast with the default 2D rendering method of drawing individual streamline vertices which are at or near the current depth position on each canvas. The tractogram can be clipped on all three axes, with options to display regions above, below, or near the current depth position (--xclipdir
, --yclipdir
, and --zclipdir
on the command-line).
Tractogram overlays can now also be associated with a reference image, in the same manner as is used for surface overlays (.vtk
, GIfTI, etc.). This allows tractograms to be correctly aligned irrespective of changes to the display space. By default it is assumed that the tractogram vertices are defined in mm/world coordinates, as this is the default for .trk
/ and .tck
files. However this can be changed via the Coordinate space (--coordSpace
) option. Internally this was accomplished by taking the reference image logic in the MeshOpts
class, and pushing it up to a mixin class called RefImageOpts
. The MeshOpts
and TractogramOpts
classes now inherit from the RefImageOpts
class.
This MR also fixes a small bug in the DisplayContext
class related to synchronisation of the DisplayContext.overlayOrder
property - in some circumstances an error could occur at startup, due to the overlayOrder
being out of sync with the OverlayList
.