public class TargetCP_Image
extends java.lang.Object
Constructor and Description |
---|
TargetCP_Image(short[][][] targets,
double xVoxelDim,
double yVoxelDim,
double zVoxelDim)
Initializes the image with the dimensions of the seed space.
|
Modifier and Type | Method and Description |
---|---|
boolean |
directional() |
double[][][][] |
getConnectionProbabilities()
Get the connection probabilities as an image, which are the streamline counts
divided by the total number of streamlines.
|
int[][][][] |
getStreamlineCounts()
Get the streamline counts as an image.
|
void |
processTract(Tract t)
Add a single streamline to the image.
|
void |
processTracts(TractCollection tc)
Add some streamlines to the image.
|
void |
setCountFirstEntry(boolean b)
The default behaviour is to count the first entry of a streamline to a target zone.
|
void |
setDirectional(Vector3D v)
Call this method to split the streamlines in two at the seed point and produce
separate connection probability maps from each.
|
int |
totalStreamlines() |
public TargetCP_Image(short[][][] targets, double xVoxelDim, double yVoxelDim, double zVoxelDim)
public void setDirectional(Vector3D v)
v
defines a "forward"
direction and should be approximately tangential to the streamline path at the seed point.
Two volumes will be returned from getStreamlineCounts
and getConnectionProbabilities
. The first volume is connection probabilities
for streamline segments where the dot product of the streamline direction and v is greater
than zero. The second volume is connection probabilities in the other direction.
As an example, consider mapping the connectivity from the corpus callosum. We have streamlines seeded along the mid-sagittal line, which proceed to the left and right hemispheres. We would therefore use v = [-1, 0, 0]. Streamlines are then split at the seed point and the segments proceeding left (or in any direction with a negative x component) form the first connection probability volume. Those proceeding to the right (direction with a positive x component) form the second connection probability volume. We can therefore get connection probability maps to the left and right hemispheres from the same seed point. This example shows the importance of choosing the direction v carefully. It is important that v is not perpendicular to the streamline direction at any seed point.
v
- a "forward" direction. Should be approximately tangential to the streamline
trajectory at the seed point.public boolean directional()
public final void processTracts(TractCollection tc)
public final void processTract(Tract t)
public int[][][][] getStreamlineCounts()
sc
. If directional, sc.length == 2
and
sc[0]
is the image for streamline segments proceeding in the forward
direction.setDirectional(numerics.Vector3D)
public double[][][][] getConnectionProbabilities()
cp
. If directional, cp.length == 2
and
cp[0]
is the image for streamline segments proceeding in the forward
direction.setDirectional(numerics.Vector3D)
public int totalStreamlines()
processTracts
.public void setCountFirstEntry(boolean b)
false
parameter, then streamlines are
allowed to connect to any number of target zones.setDirectional(numerics.Vector3D)