Commit 446c7035 authored by Marc Modat's avatar Marc Modat

Some more functions have a 2D version

parent caf2572e
......@@ -1190,11 +1190,11 @@ int main(int argc, char **argv)
// first conjugate gradient iteration
if(flag->twoDimRegistration){
PrecisionTYPE *conjGPtrX = &conjugateG[0];
PrecisionTYPE *conjGPtrY = &conjGPtrX[nodeNMIGradientImage->nx * nodeNMIGradientImage->ny * nodeNMIGradientImage->nz];
PrecisionTYPE *conjGPtrY = &conjGPtrX[nodeNMIGradientImage->nx * nodeNMIGradientImage->ny];
PrecisionTYPE *conjHPtrX = &conjugateH[0];
PrecisionTYPE *conjHPtrY = &conjHPtrX[nodeNMIGradientImage->nx * nodeNMIGradientImage->ny * nodeNMIGradientImage->nz];
PrecisionTYPE *conjHPtrY = &conjHPtrX[nodeNMIGradientImage->nx * nodeNMIGradientImage->ny];
PrecisionTYPE *gradientValuesX = static_cast<PrecisionTYPE *>(nodeNMIGradientImage->data);
PrecisionTYPE *gradientValuesY = &gradientValuesX[nodeNMIGradientImage->nx*nodeNMIGradientImage->ny*nodeNMIGradientImage->nz];
PrecisionTYPE *gradientValuesY = &gradientValuesX[nodeNMIGradientImage->nx*nodeNMIGradientImage->ny];
for(int i=0; i<nodeNMIGradientImage->nx*nodeNMIGradientImage->ny;i++){
*conjHPtrX++ = *conjGPtrX++ = - *gradientValuesX++;
*conjHPtrY++ = *conjGPtrY++ = - *gradientValuesY++;
......
This diff is collapsed.
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