public class TractStatisticImage
extends java.lang.Object
setTractStatistic
method. The values from all streamlines are combined into
the output image.
Tract-based scalar images
Tract-based scalar images combine streamlines with a scalar image (for example, FA). The streamlines
should be defined in the same space as the scalar image. The vector value of the scalar data is evaluated at
each point along the streamline; a scalar function (min, max, mean, median, var) of this data vector is
computed and then asssigned to the image.
Tract-based images without scalars
Without a scalar image, the tract statistic is derived directly from the streamlines. Currently, the only
available statistic is the length.
Creating the image
The statistic from each tract is assigned to the seed voxel of the tract, or optionally to every
voxel intersected by the tract. The setImageStatistic
and setCountIntersect
methods determines how the tract values are combined into the output image.
values
Constructor and Description |
---|
TractStatisticImage(double[][][] scalarData,
double[] voxelDims)
For Matlab.
|
TractStatisticImage(int[] dataDims,
double[] voxelDims)
Constructs an image without scalars.
|
TractStatisticImage(ScalarImage scalars)
Construct an image that uses the scalar image to define the tract statistic.
|
Modifier and Type | Method and Description |
---|---|
double[][][] |
getImageStatistic()
Gets the tract-based statistical image.
|
void |
processTract(Tract t)
Processes a single tract.
|
void |
processTracts(TractCollection tc)
Add all of the tracts in the collection to the image.
|
void |
setCountIntersect(boolean countIntersect)
By default, the tract statistic is only added to the voxel where the tract was seeded.
|
void |
setImageStatistic(java.lang.String stat)
Sets the image statistic, which determines how multiple values in each voxel are combined.
|
void |
setInterpolate(boolean interp)
By default, the image is not interpolated.
|
void |
setTractStatistic(java.lang.String stat)
Sets the tract statistic.
|
public TractStatisticImage(ScalarImage scalars)
scalars
- a ScalarImage. The interpolation scheme of the image may be changed
if interpolation is enabled for the TractStatisticImage. The image should be in the
same space as the tracts.public TractStatisticImage(double[][][] scalarData, double[] voxelDims)
data
- the scalar data.voxelDims
- voxel dimensions in mm.public TractStatisticImage(int[] dataDims, double[] voxelDims)
dataDims
- image dimensions.voxelDims
- voxel dimensions, in mm.public void setTractStatistic(java.lang.String stat)
stat
- one of the scalar statistics supported by TractStatisticFilter
. Vector
statistics, such as "meanvar" are not supported by this image (the first element will be used).public void setImageStatistic(java.lang.String stat)
stat
- one of: mean, min, max, median, var.public void setInterpolate(boolean interp)
interp
- if true, use linear interpolation of the scalar image and treat the tracts
as interpolated.TractStatisticFilter
public void setCountIntersect(boolean countIntersect)
true
parameter, each tract statistic is added to all voxels
intersected by the tract.public void processTracts(TractCollection tc)
public void processTract(Tract t)
public double[][][] getImageStatistic()