Content-type: text/html
Converts raw or voxel format streamlines to VTK polydata. These can be loaded into Paraview or other programs that read VTK data. Scalar data can be associated with the streamlines, this can be used to scale or colour the data within VTK.
The options for scalar data are:
No scalars - the default.
Colour by orientation - colour the streamline points by local orientation.
Seed ROI - the scalar value for each point on the streamline is the ROI index of its seed point.
target ROI - the scalar value for each point on the streamline is the index of the first target ROI
that it intersects. Each segment (either side of the seed) is treated separately, unless one segment
intersects a target and the other does not, in which case the entire streamline has the scalar of the
intersected target.
Custom scalars - pass any Analyze image that is in the same physical space as the tracts. Each point
of the streamline has the scalar value from the corresponding point in the image.
With the exception of orientation RGB encoding, the mapping of scalars to colours is handled by a VTK lookup table, which is provided at run time. Streamlines coloured by orientation have 24-bit RGB scalars, which are interpreted directly as colours.
Input data must be raw binary tracts (the output of track and procstreamlines). These tracts are described in the same physical space as the scalar image passed to this program.
Produce streamlines with no scalars.
vtkstreamlines < streamlines.Bfloat > streamlines.vtk
Encode the local orientation of the streamline as an RGB colour scalar.
vtkstreamlines -colourorient < streamlines.Bfloat > streamlines_rgborient.vtk
Use the ROI index of the seed point as the scalar. This produces one colour per seed ROI
vtkstreamlines -seedfile seeds.nii < streamlines.Bfloat > streamlines_seed.vtk
Use the ROI index of the target as the scalar. This produces one colour per target ROI. Streamlines that do not intersect any target have zero scalars.
vtkstreamlines -targetfile targets.nii < streamlines.Bfloat > streamlines_target.vtk
Use the local fractional anisotropy as the scalar for each point.
vtkstreamlines -scalarfile fa.nii.gz < streamlines.Bfloat > streamlines_fa.vtk