Commit eed99071 authored by Gergely Zombori's avatar Gergely Zombori

Fixed Windows only error: "index variable in OpenMP 'for' statement must have signed integral type"

parent 38452dfa
......@@ -20,7 +20,12 @@ double reg_getKLDivergence1(nifti_image *referenceImage,
int *mask)
{
size_t voxelNumber = referenceImage->nx*referenceImage->ny*referenceImage->nz;
size_t voxel;
#ifdef _WINDOWS
int voxel;
#else
size_t voxel;
#endif
DTYPE *refPtr=static_cast<DTYPE *>(referenceImage->data);
DTYPE *warPtr=static_cast<DTYPE *>(warpedImage->data);
......@@ -118,7 +123,12 @@ void reg_getKLDivergenceVoxelBasedGradient1(nifti_image *referenceImage,
int *mask)
{
size_t voxelNumber = referenceImage->nx*referenceImage->ny*referenceImage->nz;
size_t voxel;
#ifdef _WINDOWS
int voxel;
#else
size_t voxel;
#endif
DTYPE *refPtr=static_cast<DTYPE *>(referenceImage->data);
DTYPE *warPtr=static_cast<DTYPE *>(warpedImage->data);
......
......@@ -3290,7 +3290,13 @@ void compute_lie_bracket(nifti_image *img1,
DTYPE *one_twoPtr=static_cast<DTYPE *>(one_two->data);
DTYPE *two_onePtr=static_cast<DTYPE *>(two_one->data);
// Compute the lie bracket value using difference of composition
#ifdef _WINDOWS
int i;
#else
size_t i;
#endif
#ifdef _OPENMP
#pragma omp parallel for default(none) \
shared(res, resPtr, one_twoPtr, two_onePtr) \
......@@ -3311,7 +3317,13 @@ void compute_BCH_update1(nifti_image *img1, // current field
int type)
{
DTYPE *res=(DTYPE *)malloc(img1->nvox*sizeof(DTYPE));
#ifdef _WINDOWS
int i;
#else
size_t i;
#endif
bool use_jac=false;
// r <- 2 + 1
......
......@@ -30,7 +30,12 @@ double reg_getSSD1(nifti_image *referenceImage,
jacDetPtr=static_cast<DTYPE *>(jacobianDetImage->data);
// Create some variables to be use in the openmp loop
size_t voxel;
#ifdef _WINDOWS
int voxel;
#else
size_t voxel;
#endif
double SSD=0.0, n=0.0;
double targetValue, resultValue, diff;
......@@ -130,7 +135,13 @@ void reg_getVoxelBasedSSDGradient1(nifti_image *referenceImage,
{
// Create pointers to the reference and warped images
size_t voxelNumber = referenceImage->nx*referenceImage->ny*referenceImage->nz;
size_t voxel;
#ifdef _WINDOWS
int voxel;
#else
size_t voxel;
#endif
DTYPE *refPtr=static_cast<DTYPE *>(referenceImage->data);
DTYPE *warPtr=static_cast<DTYPE *>(warpedImage->data);
......
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