Commit 120734bb authored by Pankaj Daga's avatar Pankaj Daga

Renumber the active blocks to ensure consistency with the GPU version.

parent 7385e31a
......@@ -155,6 +155,19 @@ void _reg_set_active_blocks(nifti_image *targetImage, _reg_blockMatchingParam *p
for (int i = params->activeBlockNumber; i < totalBlockNumber; ++i){
params->activeBlock[*indexArrayPtr--] = -1;
}
// renumber them to ensure consistency with the GPU version
count = 0;
for (int i = 0; i < totalBlockNumber; ++i)
{
if (params->activeBlock[i] != -1)
{
params->activeBlock[i] = count;
++count;
}
}
free(varianceArray);
free(indexArray);
}
......
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