Commit a5041a35 authored by Jamie Mcclelland's avatar Jamie Mcclelland

fixed code so builds in visual studio

parent e4eab3bf
......@@ -14,7 +14,7 @@
/* *************************************************************** */
/* *************************************************************** */
reg_dti::reg_dti()
: reg_ssd::reg_ssd()
: reg_ssd()
{
#ifndef NDEBUG
printf("[NiftyReg DEBUG] reg_dti constructor called\n");
......
......@@ -17,7 +17,7 @@
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
reg_lncc::reg_lncc()
: reg_measure::reg_measure()
: reg_measure()
{
this->forwardCorrelationImage=NULL;
this->referenceMeanImage=NULL;
......@@ -270,7 +270,7 @@ double reg_getLNCCValue(nifti_image *referenceImage,
DTYPE *refSdevPtr=static_cast<DTYPE *>(referenceSdevImage->data);
DTYPE *warSdevPtr=static_cast<DTYPE *>(warpedSdevImage->data);
DTYPE *correlaPtr=static_cast<DTYPE *>(correlationImage->data);
size_t voxel, voxelNumber = (size_t)referenceImage->nx*
int voxel, voxelNumber = (int)referenceImage->nx*
referenceImage->ny*referenceImage->nz;
// Iteration over all time points
......@@ -430,7 +430,7 @@ void reg_getVoxelBasedLNCCGradient(nifti_image *referenceImage,
DTYPE *warSdevPtr=static_cast<DTYPE *>(warpedSdevImage->data);
DTYPE *correlaPtr=static_cast<DTYPE *>(correlationImage->data);
size_t voxel, voxelNumber = (size_t)referenceImage->nx *
int voxel, voxelNumber = (int)referenceImage->nx *
referenceImage->ny * referenceImage->nz;
// Create some pointers to the gradient images
......
......@@ -3364,7 +3364,7 @@ void reg_defField_getDeformationFieldFromFlowField(nifti_image *flowFieldImage,
printf("[NiftyReg] Changing from %i to %i squaring step (equivalent to scaling down by %i)\n",
static_cast<int>(reg_round(fabs(flowFieldImage->intent_p2))),
abs(squaringNumber),
(int)pow(2,squaringNumber));
(int)pow(2.0f,squaringNumber));
}
// Update the number of squaring step required
if(flowFieldImage->intent_p2>=0)
......
......@@ -17,7 +17,7 @@
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
reg_nmi::reg_nmi()
: reg_measure::reg_measure()
: reg_measure()
{
this->forwardJointHistogramPro=NULL;
this->forwardJointHistogramLog=NULL;
......@@ -616,8 +616,7 @@ void reg_getVoxelBasedNMIGradient3D(nifti_image *referenceImage,
double nmi = (entropyPtr[0]+entropyPtr[1])/entropyPtr[2];
size_t referenceOffset=referenceBinNumber[t]*floatingBinNumber[t];
size_t floatingOffset=referenceOffset+referenceBinNumber[t];
size_t i;
int r,w;
int r,w,i;
DTYPE refValue,warValue,gradX,gradY,gradZ;
double jointDeriv[3],refDeriv[3],warDeriv[3],commun,jointLog,refLog,warLog;
// Iterate over all voxel
......
......@@ -80,7 +80,7 @@ void reg_dti_resampling_preprocessing(nifti_image *floatingImage,
// Should log the tensor up front
// We need to take the logarithm of the tensor for each voxel in the floating intensity image, and replace the warped
size_t floatingIndex;
int floatingIndex;
#ifdef _OPENMP
#pragma omp parallel for default(none) \
private(floatingIndex,diffTensor) \
......@@ -164,7 +164,7 @@ void reg_dti_resampling_postprocessing(nifti_image *inputImage,
DTYPE *inputIntensityZZ = &firstWarpVox[voxelNumber*(dtIndicies[5]+inputImage->nt*u)];
// Step through each voxel in the warped image
size_t warpedIndex; double testSum=0;
int warpedIndex; double testSum=0;
reg_mat44d inputTensor, warpedTensor, RotMat, RotMatT, preMult;
mat33 jacobianMatrix, R;
#ifdef _OPENMP
......
......@@ -16,7 +16,7 @@
/* *************************************************************** */
/* *************************************************************** */
reg_ssd::reg_ssd()
: reg_measure::reg_measure()
: reg_measure()
{
#ifndef NDEBUG
printf("[NiftyReg DEBUG] reg_ssd constructor called\n");
......
......@@ -932,7 +932,7 @@ void reg_tools_kernelConvolution_core(nifti_image *image,
for(int t=0; t<image->nt*image->nu; t++){
if(timePoint[t]){
DTYPE *intensityPtr = &imagePtr[t * voxelNumber];
size_t index;
int index;
for(index=0; index<voxelNumber; index++){
densityPtr[index] = (intensityPtr[index]==intensityPtr[index])?1:0;
densityPtr[index] *= (mask[index]>=0)?1:0;
......
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