Commit 89cfa3df authored by Marc Modat's avatar Marc Modat

Merge branch 'master' of ssh://git.code.sf.net/p/niftyreg/git

parents 7b3c7a4f 7d977786
...@@ -75,6 +75,7 @@ void reg_dti_resampling_preprocessing(nifti_image *floatingImage, ...@@ -75,6 +75,7 @@ void reg_dti_resampling_preprocessing(nifti_image *floatingImage,
/* As the tensor has 6 unique components that we need to worry about, read them out /* As the tensor has 6 unique components that we need to worry about, read them out
for the floating image. */ for the floating image. */
DTYPE *firstVox = static_cast<DTYPE *>(floatingImage->data); DTYPE *firstVox = static_cast<DTYPE *>(floatingImage->data);
// CAUTION: Here the tensor is assumed to be encoding in lower triangular order
DTYPE *floatingIntensityXX = &firstVox[floatingVoxelNumber*dtIndicies[0]]; DTYPE *floatingIntensityXX = &firstVox[floatingVoxelNumber*dtIndicies[0]];
DTYPE *floatingIntensityXY = &firstVox[floatingVoxelNumber*dtIndicies[1]]; DTYPE *floatingIntensityXY = &firstVox[floatingVoxelNumber*dtIndicies[1]];
DTYPE *floatingIntensityYY = &firstVox[floatingVoxelNumber*dtIndicies[2]]; DTYPE *floatingIntensityYY = &firstVox[floatingVoxelNumber*dtIndicies[2]];
...@@ -162,6 +163,7 @@ void reg_dti_resampling_postprocessing(nifti_image *inputImage, ...@@ -162,6 +163,7 @@ void reg_dti_resampling_postprocessing(nifti_image *inputImage,
if(warpedImage!=NULL) if(warpedImage!=NULL)
{ {
warpVox = static_cast<DTYPE *>(warpedImage->data); warpVox = static_cast<DTYPE *>(warpedImage->data);
// CAUTION: Here the tensor is assumed to be encoding in lower triangular order
warpedXX = &warpVox[voxelNumber*dtIndicies[0]]; warpedXX = &warpVox[voxelNumber*dtIndicies[0]];
warpedXY = &warpVox[voxelNumber*dtIndicies[1]]; warpedXY = &warpVox[voxelNumber*dtIndicies[1]];
warpedYY = &warpVox[voxelNumber*dtIndicies[2]]; warpedYY = &warpVox[voxelNumber*dtIndicies[2]];
...@@ -175,7 +177,7 @@ void reg_dti_resampling_postprocessing(nifti_image *inputImage, ...@@ -175,7 +177,7 @@ void reg_dti_resampling_postprocessing(nifti_image *inputImage,
// let's reorient each tensor based on the rigid component of the local warping // let's reorient each tensor based on the rigid component of the local warping
/* As the tensor has 6 unique components that we need to worry about, read them out /* As the tensor has 6 unique components that we need to worry about, read them out
for the warped image. */ for the warped image. */
// CAUTION: Here the tensor is assumed to be encoding in lower triangular order
DTYPE *firstWarpVox = static_cast<DTYPE *>(inputImage->data); DTYPE *firstWarpVox = static_cast<DTYPE *>(inputImage->data);
DTYPE *inputIntensityXX = &firstWarpVox[voxelNumber*(dtIndicies[0]+inputImage->nt*u)]; DTYPE *inputIntensityXX = &firstWarpVox[voxelNumber*(dtIndicies[0]+inputImage->nt*u)];
DTYPE *inputIntensityXY = &firstWarpVox[voxelNumber*(dtIndicies[1]+inputImage->nt*u)]; DTYPE *inputIntensityXY = &firstWarpVox[voxelNumber*(dtIndicies[1]+inputImage->nt*u)];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment