WeightedOrientation¶
from mcot.gcoord.orientation import WeightedOrientation
-
class
mcot.gcoord.orientation.
WeightedOrientation
(white, pial, sulcal_depth, resolution_grid, target_affine)[source]¶ Can compute an averaged radial/tangential fiber orientations for every voxel.
-
__init__
(white, pial, sulcal_depth, resolution_grid, target_affine)[source]¶ Prepares computation of the radial/tangential fiber orientations.
- Parameters
white (CorticalMesh) – white/gray matter boundary
pial (CorticalMesh) – pial surface
sulcal_depth – sulcal depth
resolution_grid – voxel size of the accelerator grid in mm
target_affine – (4x4) array giving the voxel -> mm conversion for the target grid
Inheritance diagram
Methods
average_line_grid
(shape[, zval, norient, …])Computes the radial/tangential orientations on a grid.
average_line_vox
(mm_index[, norient, power_dist])Computes the radial/tangential hemisphere at the given point.
average_point
(voxel[, power_dist])Computes the radial and tangential hemisphere at given voxel.
average_point_grid
(shape[, zval, …])Computes the primary orientations at every point within the pial surface.
closest_vertex_grid
(shape[, zval, outside_pial])Computes the primary orientations at every point within the pial surface.
-
average_line_grid¶
-
WeightedOrientation.
average_line_grid
(shape, zval=None, norient=1000, power_dist=- 1.0)[source]¶ Computes the radial/tangential orientations on a grid.
This uses the main FOTACS algorithm: 1. Draw straight lines through the point of interest connecting the cortical surfaces at both sides 2. Linearly interpolate the normal/sulcal depth gradient along this line Repeat these steps for norient random orientations. Average these orientations with the weighting set by the line length ** power_dist.
- Parameters
shape – (nx, ny, nz); defines the shape of the output volume
zval – only evaluates a single horizontal slice if set
norient – number of random orientations to try
power_dist – power-law used to downweight longer faces (weight = dist ** power_dist)
average_line_vox¶
-
WeightedOrientation.
average_line_vox
(mm_index, norient=1000, power_dist=- 1.0)[source]¶ Computes the radial/tangential hemisphere at the given point.
This uses the main FOTACS algorithm:
Draw straight lines through the point of interest connecting the cortical surfaces at both sides
Linearly interpolate the normal/sulcal depth gradient along this line
Repeat these steps for norient random orientations. Average these orientations with the weighting set by the line length ** power_dist.
- Parameters
mm_index – (3, ) vector of position in mm
norient – number of random orientations to try
power_dist – power-law used to downweight longer faces (weight = dist ** power_dist)
- Returns
Tuple with 4 elements:
interpolated normal
interpolated sulcal depth gradient
length of shortest line hitting surface on both sides
number between 0 and 0.5 indicating location along shortest line (0 if at edge, 0.5 if in middle of gyrus)
average_point¶
-
WeightedOrientation.
average_point
(voxel, power_dist=- 1.0)[source]¶ Computes the radial and tangential hemisphere at given voxel.
This algorithm averages the normal/sulcal depth gradient of every vertex weighted by its distance from the point of interest
- Parameters
voxel – (3, ) array with point of interest in voxel coordinates
power_dist – power-law used to downweight longer faces (weight = dist ** power_dist)
average_point_grid¶
-
WeightedOrientation.
average_point_grid
(shape, zval=None, power_dist=- 1.0, outside_pial=False)[source]¶ Computes the primary orientations at every point within the pial surface.
This algorithm averages the normal/sulcal depth gradient of every vertex weighted by its distance from the point of interest
- Parameters
shape – shape of the resulting array
zval – only process a single horizontal slice
power_dist – power-law used to downweight longer faces (weight = dist ** power_dist)
outside_pial – if True also run for voxels outside of the pial surface
closest_vertex_grid¶
-
WeightedOrientation.
closest_vertex_grid
(shape, zval=None, outside_pial=False)[source]¶ Computes the primary orientations at every point within the pial surface.
This algorithm selects the normal/sulcal depth gradient from the closest point.
- Parameters
shape – shape of the resulting array
zval – only process a single horizontal slice
outside_pial – if True also run for voxels outside of the pial surface