Skip to content

BF: Fix creation of seed->target affine in probtrackx2_gpu --omatrix2

Paul McCarthy requested to merge bf/probtrackx2_gpu-omatrix2 into master

The --omatrix2 option to probtrackx2_gpu performs voxel-wise tractography from a seed mask to a target mask. The seed and target masks are assumed to be defined in the same space (e.g. a structural image), and a transformation matrix / warp provided to transform from seed/target space into diffusion space.

The affected code is creating a seed-to-target affine transformation - this may be necessary despite the seed and target being defined in the same space, as the target mask may be down-sampled. However the code is creating this transformation from the seed->diffusion transformation, so is effectively assuming that the target image is defined in diffusion space.

This MR fixes the code so that the seed->target affine is constructed to be a scaling matrix (or an identity matrix if the target mask is of full resolution).

Merge request reports

Loading