Commit 17f55d5f authored by Marc Modat's avatar Marc Modat

Removed all unsigned and signed value comparison warnings

parent 11f27cd1
......@@ -19,7 +19,7 @@
# include "_reg_f3d_gpu.h"
#endif
#ifdef _WINDOWS
#ifdef _WIN32
# include <time.h>
#endif
......
......@@ -20,7 +20,7 @@ double reg_getKLDivergence1(nifti_image *referenceImage,
int *mask)
{
size_t voxelNumber = (size_t)referenceImage->nx*referenceImage->ny*referenceImage->nz;
#ifdef _WINDOWS
#ifdef _WIN32
int voxel;
#else
size_t voxel;
......@@ -126,7 +126,7 @@ void reg_getKLDivergenceVoxelBasedGradient1(nifti_image *referenceImage,
int *mask)
{
size_t voxelNumber = (size_t)referenceImage->nx*referenceImage->ny*referenceImage->nz;
#ifdef _WINDOWS
#ifdef _WIN32
int voxel;
#else
size_t voxel;
......
......@@ -182,7 +182,7 @@ template <class DTYPE>
}
free(targetValues);
params->activeBlockNumber=params->activeBlockNumber<(totalBlockNumber-unusableBlock)?params->activeBlockNumber:(totalBlockNumber-unusableBlock);
params->activeBlockNumber=params->activeBlockNumber<((int)totalBlockNumber-unusableBlock)?params->activeBlockNumber:(totalBlockNumber-unusableBlock);
reg_heapSort(varianceArray, indexArray, totalBlockNumber);
......@@ -192,13 +192,13 @@ template <class DTYPE>
for(int i=0; i<params->activeBlockNumber; i++){
params->activeBlock[*indexArrayPtr--] = count++;
}
for (int i = params->activeBlockNumber; i < totalBlockNumber; ++i){
for (size_t i = params->activeBlockNumber; i < totalBlockNumber; ++i){
params->activeBlock[*indexArrayPtr--] = -1;
}
count = 0;
if (runningOnGPU) {
for(int i = 0; i < totalBlockNumber; ++i){
for(size_t i = 0; i < totalBlockNumber; ++i){
if(params->activeBlock[i] != -1){
params->activeBlock[i] = -1;
params->activeBlock[count] = i;
......
......@@ -511,7 +511,7 @@ void reg_f3d<T>::GetSimilarityMeasureGradient()
/* The similarity measure gradient is converted from voxel space to real space */
mat44 *floatingMatrix_xyz=NULL;
size_t controlPointNumber=(size_t)this->controlPointGrid->nx*this->controlPointGrid->ny*this->controlPointGrid->nz;
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......@@ -647,7 +647,8 @@ T reg_f3d<T>::NormaliseGradient()
T *ptrX = static_cast<T *>(this->transformationGradient->data);
T *ptrY = &ptrX[voxNumber];
T *ptrZ = NULL;
float *length=(float *)calloc(voxNumber,sizeof(float));
T maxGradValue=0;
// float *length=(float *)calloc(voxNumber,sizeof(float));
if(this->transformationGradient->nz>1){
ptrZ = &ptrY[voxNumber];
for(size_t i=0; i<voxNumber; i++){
......@@ -658,9 +659,9 @@ T reg_f3d<T>::NormaliseGradient()
valY = *ptrY++;
if(this->optimiseZ==true)
valZ = *ptrZ++;
length[i] = (float)(sqrt(valX*valX + valY*valY + valZ*valZ));
// T length = (T)(sqrt(valX*valX + valY*valY + valZ*valZ));
// maxGradValue = (length>maxGradValue)?length:maxGradValue;
// length[i] = (float)(sqrt(valX*valX + valY*valY + valZ*valZ));
T length = (T)(sqrt(valX*valX + valY*valY + valZ*valZ));
maxGradValue = (length>maxGradValue)?length:maxGradValue;
}
}
else{
......@@ -670,14 +671,14 @@ T reg_f3d<T>::NormaliseGradient()
valX = *ptrX++;
if(this->optimiseY==true)
valY = *ptrY++;
length[i] = (float)(sqrt(valX*valX + valY*valY));
// T length = (T)(sqrt(valX*valX + valY*valY));
// maxGradValue = (length>maxGradValue)?length:maxGradValue;
// length[i] = (float)(sqrt(valX*valX + valY*valY));
T length = (T)(sqrt(valX*valX + valY*valY));
maxGradValue = (length>maxGradValue)?length:maxGradValue;
}
}
reg_heapSort(length,voxNumber);
T maxGradValue = (T)(length[90*voxNumber/100 - 1]);
free(length);
// reg_heapSort(length,voxNumber);
// T maxGradValue = (T)(length[90*voxNumber/100 - 1]);
// free(length);
if(strcmp(this->executableName,"NiftyReg F3D")==0){
......
......@@ -821,7 +821,7 @@ void reg_f3d_sym<T>::GetSimilarityMeasureGradient()
(size_t)this->backwardControlPointGrid->nx *
this->backwardControlPointGrid->ny *
this->backwardControlPointGrid->nz;
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......@@ -1005,7 +1005,7 @@ T reg_f3d_sym<T>::NormaliseGradient()
T *bckPtrY = &bckPtrX[voxNumber];
if(this->backwardTransformationGradient->nz>1){
T *bckPtrZ = &bckPtrY[voxNumber];
for(int i=0; i<voxNumber; i++){
for(size_t i=0; i<voxNumber; i++){
T valX=0,valY=0,valZ=0;
if(this->optimiseX==true)
valX = *bckPtrX++;
......@@ -1018,7 +1018,7 @@ T reg_f3d_sym<T>::NormaliseGradient()
}
}
else{
for(int i=0; i<voxNumber; i++){
for(size_t i=0; i<voxNumber; i++){
T valX=0,valY=0;
if(this->optimiseX==true)
valX = *bckPtrX++;
......
......@@ -148,7 +148,7 @@ void reg_fem_getDeformationField(float *nodePositions,
float *defPtrY = &defPtrX[voxelNumber];
float *defPtrZ = &defPtrY[voxelNumber];
#ifdef _WINDOWS
#ifdef _WIN32
int voxel;
#else
size_t voxel;
......
......@@ -448,19 +448,19 @@ void reg_spline_getDeformationField2D(nifti_image *splineControlPoint,
float f[4];
} val;
__m128 tempCurrent, tempX, tempY;
#ifdef _WINDOWS
#ifdef _WIN32
__declspec(align(16)) DTYPE temp[4];
__declspec(align(16)) DTYPE yBasis[4];
union{__m128 m[16];__declspec(align(16)) DTYPE f[16];} xControlPointCoordinates;
union{__m128 m[16];__declspec(align(16)) DTYPE f[16];} yControlPointCoordinates;
union u1{__m128 m[4]; __declspec(align(16)) DTYPE f[16];}xyBasis;
#else // _WINDOWS
#else // _WIN32
DTYPE temp[4] __attribute__((aligned(16)));
DTYPE yBasis[4] __attribute__((aligned(16)));
union{__m128 m[16];DTYPE f[16] __attribute__((aligned(16)));} xControlPointCoordinates;
union{__m128 m[16];DTYPE f[16] __attribute__((aligned(16)));} yControlPointCoordinates;
union u1{__m128 m[4]; DTYPE f[16] __attribute__((aligned(16)));}xyBasis;
#endif // _WINDOWS
#endif // _WIN32
#else // _USE_SSE
DTYPE temp[4];
DTYPE yBasis[4];
......@@ -726,19 +726,19 @@ void reg_spline_getDeformationField3D(nifti_image *splineControlPoint,
__m128 tempX, tempY, tempZ, tempCurrent;
__m128 xBasis_sse, yBasis_sse, zBasis_sse, temp_basis_sse, basis_sse;
#ifdef _WINDOWS
#ifdef _WIN32
__declspec(align(16)) DTYPE temp[4];
__declspec(align(16)) DTYPE zBasis[4];
union{__m128 m[16];__declspec(align(16)) DTYPE f[16];} xControlPointCoordinates;
union{__m128 m[16];__declspec(align(16)) DTYPE f[16];} yControlPointCoordinates;
union{__m128 m[16];__declspec(align(16)) DTYPE f[16];} zControlPointCoordinates;
#else // _WINDOWS
#else // _WIN32
DTYPE temp[4] __attribute__((aligned(16)));
DTYPE zBasis[4] __attribute__((aligned(16)));
union{__m128 m[16];DTYPE f[16] __attribute__((aligned(16)));} xControlPointCoordinates;
union{__m128 m[16];DTYPE f[16] __attribute__((aligned(16)));} yControlPointCoordinates;
union{__m128 m[16];DTYPE f[16] __attribute__((aligned(16)));} zControlPointCoordinates;
#endif // _WINDOWS
#endif // _WIN32
#else // _USE_SSE
DTYPE temp[4];
DTYPE zBasis[4];
......@@ -775,7 +775,7 @@ void reg_spline_getDeformationField3D(nifti_image *splineControlPoint,
referenceMatrix_real_to_voxel=&(splineControlPoint->sto_ijk);
else referenceMatrix_real_to_voxel=&(splineControlPoint->qto_ijk);
#ifdef _USE_SSE
#ifdef _WINDOWS
#ifdef _WIN32
__declspec(align(16)) DTYPE xBasis[4];
__declspec(align(16)) DTYPE yBasis[4];
#else
......@@ -938,13 +938,13 @@ void reg_spline_getDeformationField3D(nifti_image *splineControlPoint,
}//Composition of deformation
else{ // !composition
#ifdef _USE_SSE
#ifdef _WINDOWS
#ifdef _WIN32
union u1{__m128 m[4];__declspec(align(16)) DTYPE f[16];}yzBasis;
union u2{__m128 m[16];__declspec(align(16)) DTYPE f[64];}xyzBasis;
#else // _WINDOWS
#else // _WIN32
union u1{__m128 m[4];DTYPE f[16] __attribute__((aligned(16)));}yzBasis;
union u2{__m128 m[16];DTYPE f[64] __attribute__((aligned(16)));}xyzBasis;
#endif // _WINDOWS
#endif // _WIN32
#else // _USE_SSE
DTYPE yzBasis[16], xyzBasis[64];
#endif // _USE_SSE
......@@ -2001,7 +2001,7 @@ void reg_defField_compose2D(nifti_image *deformationField,
df_voxel2Real=&(deformationField->qto_xyz);
}
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......@@ -2096,7 +2096,7 @@ void reg_defField_compose3D(nifti_image *deformationField,
df_real2Voxel=&deformationField->qto_ijk;
df_voxel2Real=&deformationField->qto_xyz;
}
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......@@ -2439,10 +2439,10 @@ nmsimplex_move_corner (const double coeff, nmsimplex_state_t *state,
size_t i, j;
double newval, mp;
for (j = 0; j < state->nvec; j++)
for (j = 0; j < (size_t)state->nvec; j++)
{
mp = 0.0;
for (i = 0; i < state->nsimplex; i++)
for (i = 0; i < (size_t)state->nsimplex; i++)
{
if (i != corner)
{
......@@ -2476,11 +2476,11 @@ nmsimplex_contract_by_best (nmsimplex_state_t *state, size_t best,
size_t i, j;
double newval;
for (i = 0; i < state->nsimplex; i++)
for (i = 0; i < (size_t)state->nsimplex; i++)
{
if (i != best)
{
for (j = 0; j < state->nvec; j++)
for (j = 0; j < (size_t)state->nvec; j++)
{
newval = 0.5 * (x1[i*state->nvec + j] + x1[best*state->nvec + j]);
x1[i*state->nvec + j] = newval;
......@@ -2505,10 +2505,10 @@ nmsimplex_calc_center (const nmsimplex_state_t *state, double *mp)
size_t i, j;
double val;
for (j = 0; j < state->nvec; j++)
for (j = 0; j < (size_t)state->nvec; j++)
{
val = 0.0;
for (i = 0; i < state->nsimplex; i++)
for (i = 0; i < (size_t)state->nsimplex; i++)
{
val += x1[i*state->nvec + j];
}
......@@ -2537,11 +2537,11 @@ nmsimplex_size (nmsimplex_state_t *state)
/* Calculate middle point */
nmsimplex_calc_center (state, mp);
for (i = 0; i < state->nsimplex; i++)
for (i = 0; i < (size_t)state->nsimplex; i++)
{
for (j=0; j<state->nvec; j++) s[j] = x1[i*state->nvec + j] - mp[j];
for (j=0; j<(size_t)state->nvec; j++) s[j] = x1[i*state->nvec + j] - mp[j];
t = 0;
for (j=0; j<state->nvec; j++) t += s[j]*s[j];
for (j=0; j<(size_t)state->nvec; j++) t += s[j]*s[j];
ss += sqrt(t);
}
......@@ -2553,7 +2553,6 @@ nmsimplex_set (void *vstate, gsl_multimin_function *f,
const double *x,
double *size, const double *step_size, void *fdata)
{
int status;
size_t i, j;
double val;
......@@ -2564,19 +2563,19 @@ nmsimplex_set (void *vstate, gsl_multimin_function *f,
/* first point is the original x0 */
val = f(x, fdata);
for (j=0; j<state->nvec; j++) state->x1[j] = x[j];
for (j=0; j<(size_t)state->nvec; j++) state->x1[j] = x[j];
state->y1[0] = val;
/* following points are initialized to x0 + step_size */
for (i = 0; i < state->nvec; i++)
for (i = 0; i < (size_t)state->nvec; i++)
{
for (j=0; j<state->nvec; j++) xtemp[j] = x[j];
for (j=0; j<(size_t)state->nvec; j++) xtemp[j] = x[j];
val = xtemp[i] + step_size[i];
xtemp[i] = val;
val = f(xtemp, fdata);
for (j=0; j<state->nvec; j++)
for (j=0; j<(size_t)state->nvec; j++)
state->x1[(i + 1)*state->nvec + j] = xtemp[j];
state->y1[i + 1] = val;
}
......@@ -2607,7 +2606,6 @@ nmsimplex_iterate (void *vstate, gsl_multimin_function *f,
size_t i, j;
size_t hi = 0, s_hi = 0, lo = 0;
double dhi, ds_hi, dlo;
int status;
double val, val2;
/* get index of highest, second highest and lowest point */
......@@ -2649,12 +2647,12 @@ nmsimplex_iterate (void *vstate, gsl_multimin_function *f,
if (val2 < y1[lo])
{
for (j=0; j<state->nvec; j++) x1[hi*state->nvec+j] = xc2[j];
for (j=0; j<(size_t)state->nvec; j++) x1[hi*state->nvec+j] = xc2[j];
y1[hi] = val2;
}
else
{
for (j=0; j<state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
for (j=0; j<(size_t)state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
y1[hi] = val;
}
}
......@@ -2669,7 +2667,7 @@ nmsimplex_iterate (void *vstate, gsl_multimin_function *f,
/* if trial point is better than highest point, replace
highest point */
for (j=0; j<state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
for (j=0; j<(size_t)state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
y1[hi] = val;
}
......@@ -2679,7 +2677,7 @@ nmsimplex_iterate (void *vstate, gsl_multimin_function *f,
if (val2 <= y1[hi])
{
for (j=0; j<state->nvec; j++) x1[hi*state->nvec+j] = xc2[j];
for (j=0; j<(size_t)state->nvec; j++) x1[hi*state->nvec+j] = xc2[j];
y1[hi] = val2;
}
......@@ -2695,15 +2693,15 @@ nmsimplex_iterate (void *vstate, gsl_multimin_function *f,
/* trial point is better than second highest point.
Replace highest point by it */
for (j=0; j<state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
for (j=0; j<(size_t)state->nvec; j++) x1[hi*state->nvec+j] = xc[j];
y1[hi] = val;
}
/* return lowest point of simplex as x */
lo=0; val=y1[0];
for (j=1; j<state->nsimplex; j++) if (y1[j]<val) lo=j, val=y1[j];
for (j=0; j<state->nvec; j++) x[j] = x1[lo*state->nvec+j];
for (j=1; j<(size_t)state->nsimplex; j++) if (y1[j]<val) lo=j, val=y1[j];
for (j=0; j<(size_t)state->nvec; j++) x[j] = x1[lo*state->nvec+j];
*fval = y1[lo];
......@@ -2842,7 +2840,7 @@ void reg_spline_cppComposition_2D(nifti_image *grid1,
DTYPE basis;
#ifdef _WINDOWS
#ifdef _WIN32
__declspec(align(16)) DTYPE xBasis[4];
__declspec(align(16)) DTYPE yBasis[4];
#if _USE_SSE
......@@ -2851,7 +2849,7 @@ void reg_spline_cppComposition_2D(nifti_image *grid1,
__declspec(align(16)) DTYPE xControlPointCoordinates[16];
__declspec(align(16)) DTYPE yControlPointCoordinates[16];
#else // _WINDOWS
#else // _WIN32
DTYPE xBasis[4] __attribute__((aligned(16)));
DTYPE yBasis[4] __attribute__((aligned(16)));
#if _USE_SSE
......@@ -2860,7 +2858,7 @@ void reg_spline_cppComposition_2D(nifti_image *grid1,
DTYPE xControlPointCoordinates[16] __attribute__((aligned(16)));
DTYPE yControlPointCoordinates[16] __attribute__((aligned(16)));
#endif // _WINDOWS
#endif // _WIN32
size_t coord;
......@@ -3014,7 +3012,7 @@ void reg_spline_cppComposition_3D(nifti_image *grid1,
DTYPE basis;
#ifdef _WINDOWS
#ifdef _WIN32
__declspec(align(16)) DTYPE xBasis[4];
__declspec(align(16)) DTYPE yBasis[4];
__declspec(align(16)) DTYPE zBasis[4];
......@@ -3595,7 +3593,7 @@ void compute_lie_bracket(nifti_image *img1,
DTYPE *two_onePtr=static_cast<DTYPE *>(two_one->data);
// Compute the lie bracket value using difference of composition
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......@@ -3622,7 +3620,7 @@ void compute_BCH_update1(nifti_image *img1, // current field
{
DTYPE *res=(DTYPE *)malloc(img1->nvox*sizeof(DTYPE));
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......
......@@ -392,14 +392,9 @@ void reg_spline_approxBendingEnergyGradient3D(nifti_image *splineControlPoint,
nifti_image *gradientImage,
float weight)
{
int a, b, c, bc, x, y, z, X, Y, Z;
int a, x, y, z, X, Y, Z;
// As the contraint is only computed at the voxel position, the basis value of the spline are always the same
SplineTYPE basisXX[27], basisYY[27], basisZZ[27], basisXY[27], basisYZ[27], basisXZ[27];
SplineTYPE normal[3]={1.0/6.0, 2.0/3.0, 1.0/6.0};
SplineTYPE first[3]={-0.5, 0, 0.5};
SplineTYPE second[3]={1.0, -2.0, 1.0};
// There are six different values taken into account
SplineTYPE tempXX[9], tempYY[9], tempZZ[9], tempXY[9], tempYZ[9], tempXZ[9];
SplineTYPE basisXX[27], basisYY[27], basisZZ[27], basisXY[27], basisYZ[27], basisXZ[27];
basisXX[0]=0.027778f;basisYY[0]=0.027778f;basisZZ[0]=0.027778f;
basisXY[0]=0.041667f;basisYZ[0]=0.041667f;basisXZ[0]=0.041667f;
......
......@@ -90,7 +90,7 @@ void reg_matrixInvertMultiply(T *mat,
reg_LUdecomposition(mat, dim, index);
int ii=0;
for(int i=0;i<dim;++i){
for(int i=0;i<(int)dim;++i){
int ip=index[i];
T sum = vec[ip];
vec[ip]=vec[i];
......@@ -102,9 +102,9 @@ void reg_matrixInvertMultiply(T *mat,
ii=i+1;
vec[i]=sum;
}
for(int i=dim-1;i>-1;--i){
for(int i=(int)dim-1;i>-1;--i){
T sum=vec[i];
for(int j=i+1;j<dim;++j)
for(int j=i+1;j<(int)dim;++j)
sum -= mat(i,j,dim)*vec[j];
vec[i]=sum/mat(i,i,dim);
}
......
......@@ -152,7 +152,7 @@ void reg_getEntropies1(nifti_image *referenceImage,
int num_fixed_volumes = referenceImage->nt;
int num_warped_volumes = warpedImage->nt;
int i, j;
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -795,7 +795,7 @@ void reg_getVoxelBasedNMIGradientUsingPW3D(nifti_image *referenceImage,
GradTYPE warped_common[3];
GradTYPE der_term[3];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......
......@@ -299,7 +299,7 @@ template <class T>
void reg_conjugateGradient<T>::UpdateGradientValues()
{
#ifdef _WINDOWS
#ifdef _WIN32
int i;
#else
size_t i;
......
......@@ -67,7 +67,7 @@ void CubicSplineResampleImage3D(nifti_image *floatingImage,
else sourceIJKMatrix=&(floatingImage->qto_ijk);
// Iteration over the different volume along the 4th axis
for(size_t t=0; t<warpedImage->nt*warpedImage->nu;t++){
for(size_t t=0; t<(size_t)warpedImage->nt*warpedImage->nu;t++){
#ifndef NDEBUG
printf("[NiftyReg DEBUG] 3D Cubic spline resampling of volume number %i\n",t);
#endif
......@@ -77,7 +77,7 @@ void CubicSplineResampleImage3D(nifti_image *floatingImage,
FieldTYPE xBasis[4], yBasis[4], zBasis[4], relative;
int a, b, c, Y, Z, previous[3];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -219,7 +219,7 @@ void CubicSplineResampleImage2D(nifti_image *floatingImage,
FieldTYPE xBasis[4], yBasis[4], relative;
int a, b, Y, previous[2];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -351,7 +351,7 @@ void TrilinearResampleImage(nifti_image *floatingImage,
FieldTYPE xBasis[2], yBasis[2], zBasis[2], relative;
int a, b, c, X, Y, Z, previous[3];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -523,7 +523,7 @@ void BilinearResampleImage(nifti_image *floatingImage,
FieldTYPE xBasis[2], yBasis[2], relative;
int a, b, X, Y, previous[3];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -661,7 +661,7 @@ void NearestNeighborResampleImage(nifti_image *floatingImage,
FieldTYPE world[3];
FieldTYPE position[3];
int previous[3];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -747,7 +747,7 @@ void NearestNeighborResampleImage2D(nifti_image *floatingImage,
FieldTYPE world[2];
FieldTYPE position[2];
int previous[2];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -1552,7 +1552,7 @@ void TrilinearImageGradient(nifti_image *floatingImage,
SourceTYPE *sourceIntensity = &sourceIntensityPtr[t*sourceVoxelNumber];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -1739,7 +1739,7 @@ void BilinearImageGradient(nifti_image *floatingImage,
FieldTYPE position[3], xBasis[2], yBasis[2], relative, world[2], grad[2];
FieldTYPE deriv[2];deriv[0]=-1;deriv[1]=1;
FieldTYPE coeff, xTempNewValue, yTempNewValue;
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -1870,7 +1870,7 @@ void CubicSplineImageGradient3D(nifti_image *floatingImage,
SourceTYPE *sourceIntensity = &sourceIntensityPtr[t*sourceVoxelNumber];
int previous[3], c, Z, b, Y, a;
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......@@ -2024,7 +2024,7 @@ void CubicSplineImageGradient2D(nifti_image *floatingImage,
GradientTYPE *resultGradientPtrY = &resultGradientPtrX[gradientOffSet];
SourceTYPE *sourceIntensity = &sourceIntensityPtr[t*sourceVoxelNumber];
#ifdef _WINDOWS
#ifdef _WIN32
int index;
#else
size_t index;
......
......@@ -31,7 +31,7 @@ double reg_getSSD1(nifti_image *referenceImage,
// Create some variables to be use in the openmp loop
#ifdef _WINDOWS
#ifdef _WIN32
int voxel;
#else
size_t voxel;
......@@ -136,7 +136,7 @@ void reg_getVoxelBasedSSDGradient1(nifti_image *referenceImage,
{
// Create pointers to the reference and warped images
size_t voxelNumber = (size_t)referenceImage->nx*referenceImage->ny*referenceImage->nz;
#ifdef _WINDOWS