- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=false
- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=false
- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false
- - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=false
+ - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=false
- WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=true
- WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=true
- WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=true
- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=true
- WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
- - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true
+ - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=true
matrix:
exclude:
env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false
- os: linux
compiler: clang
- env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=false
+ env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=false
- os: linux
compiler: clang
env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
- os: linux
compiler: clang
- env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true
+ env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=true
- os: osx
env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false
- os: osx
env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false
- os: osx
- env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=flase
+ env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=flase
- os: osx
env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
- os: osx
env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true
- os: osx
- env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true
+ env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0rc01 QT_VERSION=5.5.1 C11=true
language: cpp
for (unsigned int j = 0; j < 4; j++){
double absmax = 0.;
for (unsigned int i = 0; i < 4; i++)
- absmax = std::max(absmax, vnl_math_abs(matrix->GetElement(i, j)));
+ absmax = std::max(absmax, std::abs(matrix->GetElement(i, j)));
unsigned ndigits = (unsigned)std::max(0.,std::log10(absmax))+1;
width[j] = precision+ndigits+3;
}
{
m_Alpha1 = 0;
m_Alpha2 = 0;
- m_K1 = vcl_acos(-1.0)/2;
+ m_K1 = std::acos(-1.0)/2;
// m_K2 = 3.1417/2;
m_Radius = 2; // DS
m_Fast = true; // DS
typename FloatImageType::Pointer GetFuzzyMap() { return m_FuzzyMap; }
// I dont want to verify inputs information
+#if ITK_VERSION_MAJOR <= 4
virtual void VerifyInputInformation() ITK_OVERRIDE { }
+#else
+ virtual void VerifyInputInformation() const ITK_OVERRIDE { }
+#endif
// For debug
void PrintOptions();
FuzzyMapOnlyFlagOff();
FastFlagOff();
SetRadius(2.0);
- SetK1(vcl_acos(-1.0)/2);
+ SetK1(std::acos(-1.0)/2);
}
//--------------------------------------------------------------------
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
// I dont want to verify inputs information
+#if ITK_VERSION_MAJOR <= 4
virtual void VerifyInputInformation() ITK_OVERRIDE { }
-
+#else
+ virtual void VerifyInputInformation() const ITK_OVERRIDE { }
+#endif
+
protected:
BooleanOperatorLabelImageFilter();
virtual ~BooleanOperatorLabelImageFilter() {}
{
// The following block is equivalent to the following line without
// having to call floor. (Only for positive inputs, we already now that is in the image)
- // baseIndex[dim] = (long) vcl_floor(contIndex[dim] );
+ // baseIndex[dim] = (long) std::floor(contIndex[dim] );
baseIndex[dim] = (long) contIndex[dim];
distance[dim] = contIndex[dim] - double( baseIndex[dim] );
itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
// I dont want to verify inputs information
+#if ITK_VERSION_MAJOR <= 4
virtual void VerifyInputInformation() ITK_OVERRIDE { }
+#else
+ virtual void VerifyInputInformation() const ITK_OVERRIDE { }
+#endif
protected:
CropLikeImageFilter();
#include "itkImageRegionIterator.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkNumericTraits.h"
+#if ITK_VERSION_MAJOR <= 4
#include "itkSimpleFastMutexLock.h"
+#else
+#include <mutex>
+#endif
namespace clitk
{
//Some other typedefs
typedef double CoordRepType;
typedef itk::Image<double, ImageDimension> WeightsImageType;
+#if ITK_VERSION_MAJOR <= 4
typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension> MutexImageType;
+#endif
/** Point type */
typedef itk::Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType;
//Typedefs
typedef typename OutputImageType::PixelType OutputPixelType;
typedef itk::Image<double, ImageDimension > WeightsImageType;
- typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension > MutexImageType;
+#if ITK_VERSION_MAJOR <= 4
+ typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension> MutexImageType;
+#endif
//===================================================================================
//Set methods
void SetWeights(const typename WeightsImageType::Pointer input) {
m_DeformationField=input;
this->Modified();
}
+#if ITK_VERSION_MAJOR <= 4
void SetMutexImage(const typename MutexImageType::Pointer input) {
m_MutexImage=input;
this->Modified();
m_ThreadSafe=true;
}
+#else
+ void SetMutexImage() {
+ this->Modified();
+ m_ThreadSafe=true;
+ }
+#endif
//Get methods
typename WeightsImageType::Pointer GetWeights() {
//member data
typename itk::Image< double, ImageDimension>::Pointer m_Weights;
typename DeformationFieldType::Pointer m_DeformationField;
+#if ITK_VERSION_MAJOR <= 4
typename MutexImageType::Pointer m_MutexImage;
+#else
+ std::mutex m_Mutex;
+#endif
bool m_ThreadSafe;
};
for(dim = 0; dim < ImageDimension; dim++) {
// The following block is equivalent to the following line without
// having to call floor. For positive inputs!!!
- // baseIndex[dim] = (long) vcl_floor(contIndex[dim] );
+ // baseIndex[dim] = (long) std::floor(contIndex[dim] );
baseIndex[dim] = (long) contIndex[dim];
distance[dim] = contIndex[dim] - double( baseIndex[dim] );
}
} else {
//Entering critilal section: shared memory
+#if ITK_VERSION_MAJOR <= 4
m_MutexImage->GetPixel(neighIndex).Lock();
+#else
+ m_Mutex.lock();
+#endif
//Set the pixel and weight at neighIndex
outputPtr->SetPixel(neighIndex, outputPtr->GetPixel(neighIndex) + overlap * static_cast<OutputPixelType>(inputIt.Get()));
m_Weights->SetPixel(neighIndex, m_Weights->GetPixel(neighIndex) + overlap);
//Unlock
+#if ITK_VERSION_MAJOR <= 4
m_MutexImage->GetPixel(neighIndex).Unlock();
+#else
+ m_Mutex.unlock();
+#endif
}
//Add to total overlap
//Threadsafe?
if(m_ThreadSafe) {
//Allocate the mutex image
+#if ITK_VERSION_MAJOR <= 4
typename MutexImageType::Pointer mutex=ForwardWarpImageFilter::MutexImageType::New();
mutex->SetRegions(region);
mutex->Allocate();
mutex->SetSpacing(inputPtr->GetSpacing());
helper1->SetMutexImage(mutex);
+#else
+ helper1->SetMutexImage();
+#endif
if (m_Verbose) std::cout <<"Forwarp warping using a thread-safe algorithm" <<std::endl;
} else if(m_Verbose)std::cout <<"Forwarp warping using a thread-unsafe algorithm" <<std::endl;
//Some other typedefs
typedef double CoordRepType;
typedef itk::Image<double, ImageDimension> WeightsImageType;
+#if ITK_VERSION_MAJOR <= 4
typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension> MutexImageType;
+#endif
/** Point type */
typedef itk::Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType;
//Typedefs
typedef typename OutputImageType::PixelType PixelType;
typedef itk::Image<double, ImageDimension > WeightsImageType;
- typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension > MutexImageType;
+#if ITK_VERSION_MAJOR <= 4
+ typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension> MutexImageType;
+#endif
//===================================================================================
//Set methods
m_Weights = input;
this->Modified();
}
+#if ITK_VERSION_MAJOR <= 4
void SetMutexImage(const typename MutexImageType::Pointer input) {
m_MutexImage=input;
this->Modified();
m_ThreadSafe=true;
}
+#else
+ void SetMutexImage() {
+ this->Modified();
+ m_ThreadSafe=true;
+ }
+#endif
//Get methods
typename WeightsImageType::Pointer GetWeights() {
//member data
typename WeightsImageType::Pointer m_Weights;
+#if ITK_VERSION_MAJOR <= 4
typename MutexImageType::Pointer m_MutexImage;
+#else
+ std::mutex m_Mutex;
+#endif
bool m_ThreadSafe;
};
for(dim = 0; dim < ImageDimension; dim++) {
// The following block is equivalent to the following line without
// having to call floor. (Only for positive inputs, we already now that is in the image)
- // baseIndex[dim] = (long) vcl_floor(contIndex[dim] );
+ // baseIndex[dim] = (long) std::floor(contIndex[dim] );
baseIndex[dim] = (long) contIndex[dim];
distance[dim] = contIndex[dim] - double( baseIndex[dim] );
else {
//Entering critilal section: shared memory
+#if ITK_VERSION_MAJOR <= 4
m_MutexImage->GetPixel(neighIndex).Lock();
+#else
+ m_Mutex.lock();
+#endif
//Set the pixel and weight at neighIndex
outputPtr->SetPixel(neighIndex, outputPtr->GetPixel(neighIndex) - (displacement*overlap));
m_Weights->SetPixel(neighIndex, m_Weights->GetPixel(neighIndex) + overlap);
//Unlock
+#if ITK_VERSION_MAJOR <= 4
m_MutexImage->GetPixel(neighIndex).Unlock();
+#else
+ m_Mutex.unlock();
+#endif
}
//Add to total overlap
//Threadsafe?
if(m_ThreadSafe) {
//Allocate the mutex image
+#if ITK_VERSION_MAJOR <= 4
typename MutexImageType::Pointer mutex=InvertVFFilter::MutexImageType::New();
mutex->SetRegions(region);
mutex->Allocate();
mutex->SetSpacing(inputPtr->GetSpacing());
helper1->SetMutexImage(mutex);
+#else
+ helper1->SetMutexImage();
+#endif
if (m_Verbose) std::cout <<"Inverting using a thread-safe algorithm" <<std::endl;
} else if(m_Verbose)std::cout <<"Inverting using a thread-unsafe algorithm" <<std::endl;
itkBooleanMacro(LongFlag);
// I dont want to verify inputs information
- virtual void VerifyInputInformation() { }
+#if ITK_VERSION_MAJOR <= 4
+ virtual void VerifyInputInformation() ITK_OVERRIDE { }
+#else
+ virtual void VerifyInputInformation() const ITK_OVERRIDE { }
+#endif
protected:
LabelImageOverlapMeasureFilter();
public itk::PasteImageFilter< TInputImage, TSourceImage, TOutputImage >
{
public:
+#if ITK_VERSION_MAJOR <= 4
virtual void VerifyInputInformation() ITK_OVERRIDE { }
+#else
+ virtual void VerifyInputInformation() const ITK_OVERRIDE { }
+#endif
/** Standard class typedefs. */
typedef PasteImageFilter Self;
SetObjectCCLSelectionDirection(1);
ObjectCCLSelectionIgnoreSingleCCLFlagOff();
VerboseSlicesFlagOff();
- this->SetK1(vcl_acos(-1.0)/2);
+ this->SetK1(std::acos(-1.0)/2);
}
//--------------------------------------------------------------------
switch (m_SplineOrder) {
case 3:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
+ m_SplinePoles[0] = std::sqrt(3.0) - 2.0;
break;
case 0:
m_NumberOfPoles = 0;
break;
case 2:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
+ m_SplinePoles[0] = std::sqrt(8.0) - 3.0;
break;
case 4:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(664.0 - vcl_sqrt(438976.0)) + vcl_sqrt(304.0) - 19.0;
- m_SplinePoles[1] = vcl_sqrt(664.0 + vcl_sqrt(438976.0)) - vcl_sqrt(304.0) - 19.0;
+ m_SplinePoles[0] = std::sqrt(664.0 - std::sqrt(438976.0)) + std::sqrt(304.0) - 19.0;
+ m_SplinePoles[1] = std::sqrt(664.0 + std::sqrt(438976.0)) - std::sqrt(304.0) - 19.0;
break;
case 5:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0)) + vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[0] = std::sqrt(135.0 / 2.0 - std::sqrt(17745.0 / 4.0)) + std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
- m_SplinePoles[1] = vcl_sqrt(135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0)) - vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[1] = std::sqrt(135.0 / 2.0 + std::sqrt(17745.0 / 4.0)) - std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
break;
default:
horizon = m_DataLength[m_IteratorDirection];
zn = z;
if (m_Tolerance > 0.0) {
- horizon = (long)vcl_ceil(log(m_Tolerance) / vcl_log(fabs(z)));
+ horizon = (long)std::ceil(log(m_Tolerance) / std::log(fabs(z)));
}
if (horizon < m_DataLength[m_IteratorDirection]) {
/* accelerated loop */
} else {
/* full loop */
iz = 1.0 / z;
- z2n = vcl_pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
+ z2n = std::pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L];
z2n *= z2n * iz;
for (unsigned int n = 1; n <= (m_DataLength[m_IteratorDirection] - 2); n++) {
switch (m_SplineOrder) {
case 3:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
+ m_SplinePoles[0] = std::sqrt(3.0) - 2.0;
break;
case 0:
m_NumberOfPoles = 0;
break;
case 2:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
+ m_SplinePoles[0] = std::sqrt(8.0) - 3.0;
break;
case 4:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(664.0 - vcl_sqrt(438976.0)) + vcl_sqrt(304.0) - 19.0;
- m_SplinePoles[1] = vcl_sqrt(664.0 + vcl_sqrt(438976.0)) - vcl_sqrt(304.0) - 19.0;
+ m_SplinePoles[0] = std::sqrt(664.0 - std::sqrt(438976.0)) + std::sqrt(304.0) - 19.0;
+ m_SplinePoles[1] = std::sqrt(664.0 + std::sqrt(438976.0)) - std::sqrt(304.0) - 19.0;
break;
case 5:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0)) + vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[0] = std::sqrt(135.0 / 2.0 - std::sqrt(17745.0 / 4.0)) + std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
- m_SplinePoles[1] = vcl_sqrt(135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0)) - vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[1] = std::sqrt(135.0 / 2.0 + std::sqrt(17745.0 / 4.0)) - std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
break;
default:
horizon = m_DataLength[m_IteratorDirection];
zn = z;
if (m_Tolerance > 0.0) {
- horizon = (long)vcl_ceil(log(m_Tolerance) / vcl_log(fabs(z)));
+ horizon = (long)std::ceil(log(m_Tolerance) / std::log(fabs(z)));
}
if (horizon < m_DataLength[m_IteratorDirection]) {
/* accelerated loop */
} else {
/* full loop */
iz = 1.0 / z;
- z2n = vcl_pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
+ z2n = std::pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L];
z2n *= z2n * iz;
for (unsigned int n = 1; n <= (m_DataLength[m_IteratorDirection] - 2); n++) {
// compute the interpolation indexes
for (unsigned int n = 0; n< ImageDimension; n++) {
if (splineOrder & 1) { // Use this index calculation for odd splineOrder
- indx = (long)vcl_floor((float)x[n]) - splineOrder / 2;
+ indx = (long)std::floor((float)x[n]) - splineOrder / 2;
for (unsigned int k = 0; k <= splineOrder; k++) {
evaluateIndex[n][k] = indx++;
}
} else { // Use this index calculation for even splineOrder
- indx = (long)vcl_floor((float)(x[n] + 0.5)) - splineOrder / 2;
+ indx = (long)std::floor((float)(x[n] + 0.5)) - splineOrder / 2;
for (unsigned int k = 0; k <= splineOrder; k++) {
evaluateIndex[n][k] = indx++;
}
for(int l=0; l<TImageType::ImageDimension; l++) {
// Compute t1 = distance to floor
- TCoefficientType t1 = x[l]- vcl_floor(x[l]);
+ TCoefficientType t1 = x[l]- std::floor(x[l]);
// Compute index in precomputed weights table
TCoefficientType t2 = mSamplingFactors[l]*t1;
long indx;
for (unsigned int l=0; l<d; l++) {
if (mSplineOrders[l] & 1) { // Use this index calculation for odd splineOrder (like cubic)
- indx = (long)vcl_floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
+ indx = (long)std::floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
} else { // Use this index calculation for even splineOrder
if (mSplineOrders[l] == 0) evaluateIndex[l] = itk::Math::Round<long, typename ContinuousIndexType::ValueType>(x[l]);
else {
- indx = (long)vcl_floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
+ indx = (long)std::floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
}
}
long indx;
for (unsigned int l=0; l<d; l++) {
if (mSplineOrders[l] & 1) { // Use this index calculation for odd splineOrder (like cubic)
- indx = (long)vcl_floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
+ indx = (long)std::floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
} else { // Use this index calculation for even splineOrder
if (mSplineOrders[l] == 0) evaluateIndex[l] = itk::Math::Round<long, typename ContinuousIndexType::ValueType>(x[l]);
else {
- indx = (long)vcl_floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
+ indx = (long)std::floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
}
}
case 3:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
+ m_SplinePoles[0] = std::sqrt(3.0) - 2.0;
break;
case 0:
m_NumberOfPoles = 0;
break;
case 2:
m_NumberOfPoles = 1;
- m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
+ m_SplinePoles[0] = std::sqrt(8.0) - 3.0;
break;
case 4:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(664.0 - vcl_sqrt(438976.0)) + vcl_sqrt(304.0) - 19.0;
- m_SplinePoles[1] = vcl_sqrt(664.0 + vcl_sqrt(438976.0)) - vcl_sqrt(304.0) - 19.0;
+ m_SplinePoles[0] = std::sqrt(664.0 - std::sqrt(438976.0)) + std::sqrt(304.0) - 19.0;
+ m_SplinePoles[1] = std::sqrt(664.0 + std::sqrt(438976.0)) - std::sqrt(304.0) - 19.0;
break;
case 5:
m_NumberOfPoles = 2;
- m_SplinePoles[0] = vcl_sqrt(135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0)) + vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[0] = std::sqrt(135.0 / 2.0 - std::sqrt(17745.0 / 4.0)) + std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
- m_SplinePoles[1] = vcl_sqrt(135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0)) - vcl_sqrt(105.0 / 4.0)
+ m_SplinePoles[1] = std::sqrt(135.0 / 2.0 + std::sqrt(17745.0 / 4.0)) - std::sqrt(105.0 / 4.0)
- 13.0 / 2.0;
break;
default:
horizon = m_DataLength[m_IteratorDirection];
zn = z;
if (m_Tolerance > 0.0) {
- horizon = (long)vcl_ceil(log(m_Tolerance) / vcl_log(fabs(z)));
+ horizon = (long)std::ceil(log(m_Tolerance) / std::log(fabs(z)));
}
if (horizon < m_DataLength[m_IteratorDirection]) {
/* accelerated loop */
} else {
/* full loop */
iz = 1.0 / z;
- z2n = vcl_pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
+ z2n = std::pow(z, (double)(m_DataLength[m_IteratorDirection] - 1L));
sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L];
z2n *= z2n * iz;
for (unsigned int n = 1; n <= (m_DataLength[m_IteratorDirection] - 2); n++) {
for(int l=0; l<TImageType::ImageDimension; l++)
{
// Compute t1 = distance to floor
- TCoefficientType t1 = x[l]- vcl_floor(x[l]);
+ TCoefficientType t1 = x[l]- std::floor(x[l]);
// Compute index in precomputed weights table
TCoefficientType t2 = mSamplingFactors[l]*t1;
long indx;
for (unsigned int l=0; l<d; l++) {
if (mSplineOrders[l] & 1) { // Use this index calculation for odd splineOrder (like cubic)
- indx = (long)vcl_floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
+ indx = (long)std::floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
}
else { // Use this index calculation for even splineOrder
if (mSplineOrders[l] == 0) evaluateIndex[l] = Math::Round<typename ContinuousIndexType::ValueType>(x[l]);
else {
- indx = (long)vcl_floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
+ indx = (long)std::floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
evaluateIndex[l] = indx;
}
}
// bool mChange = false;
// Compute t1 = distance to floor
- TCoefficientType t1 = x[l]- vcl_floor(x[l]);
+ TCoefficientType t1 = x[l]- std::floor(x[l]);
// Compute index in precomputed weights table
TCoefficientType t2 = mSamplingFactors[l]*t1;
long indx;
for (unsigned int l=0; l<d; l++) {
if (mSplineOrders[l] & 1) { // Use this index calculation for odd splineOrder (like cubic)
- indx = (long)vcl_floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
+ indx = (long)std::floor(x[l]) - mSplineOrders[l] / 2 ; //this->m_SplineOrder / 2;
EvaluateIndex[l] = indx;
}
else { // Use this index calculation for even splineOrder
if (mSplineOrders[l] == 0) EvaluateIndex[l] = (long)rint(x[l]);
else {
- indx = (long)vcl_floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
+ indx = (long)std::floor((x[l]+ 0.5)) - mSplineOrders[l] / 2; //this->m_SplineOrder / 2;
EvaluateIndex[l] = indx;
}
}
typename InputImageType::SpacingType spacing=this->m_Image->GetSpacing();
if (m_ValidRay)
- return vcl_sqrt(m_VoxelIncrement[0]*spacing[0]*m_VoxelIncrement[0]*spacing[0]
+ return std::sqrt(m_VoxelIncrement[0]*spacing[0]*m_VoxelIncrement[0]*spacing[0]
+ m_VoxelIncrement[1]*spacing[1]*m_VoxelIncrement[1]*spacing[1]
+ m_VoxelIncrement[2]*spacing[2]*m_VoxelIncrement[2]*spacing[2] );
else
+ C*m_BoundingCorner[c1][2] );
// initialise plane value and normalise
- m_BoundingPlane[j][0] = A/vcl_sqrt(A*A + B*B + C*C);
- m_BoundingPlane[j][1] = B/vcl_sqrt(A*A + B*B + C*C);
- m_BoundingPlane[j][2] = C/vcl_sqrt(A*A + B*B + C*C);
- m_BoundingPlane[j][3] = D/vcl_sqrt(A*A + B*B + C*C);
+ m_BoundingPlane[j][0] = A/std::sqrt(A*A + B*B + C*C);
+ m_BoundingPlane[j][1] = B/std::sqrt(A*A + B*B + C*C);
+ m_BoundingPlane[j][2] = C/std::sqrt(A*A + B*B + C*C);
+ m_BoundingPlane[j][3] = D/std::sqrt(A*A + B*B + C*C);
if ( (A*A + B*B + C*C) == 0 ) {
itk::ExceptionObject err(__FILE__, __LINE__);
// Calculate the number of voxels in each direction
- xNum = vcl_fabs(m_RayVoxelStartPosition[0] - m_RayVoxelEndPosition[0]);
- yNum = vcl_fabs(m_RayVoxelStartPosition[1] - m_RayVoxelEndPosition[1]);
- zNum = vcl_fabs(m_RayVoxelStartPosition[2] - m_RayVoxelEndPosition[2]);
+ xNum = std::fabs(m_RayVoxelStartPosition[0] - m_RayVoxelEndPosition[0]);
+ yNum = std::fabs(m_RayVoxelStartPosition[1] - m_RayVoxelEndPosition[1]);
+ zNum = std::fabs(m_RayVoxelStartPosition[2] - m_RayVoxelEndPosition[2]);
// The direction iterated in is that with the greatest number of voxels
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
startOK = false;
endOK = false;
- Istart[0] = (int) vcl_floor(m_RayVoxelStartPosition[0]);
- Istart[1] = (int) vcl_floor(m_RayVoxelStartPosition[1]);
- Istart[2] = (int) vcl_floor(m_RayVoxelStartPosition[2]);
+ Istart[0] = (int) std::floor(m_RayVoxelStartPosition[0]);
+ Istart[1] = (int) std::floor(m_RayVoxelStartPosition[1]);
+ Istart[2] = (int) std::floor(m_RayVoxelStartPosition[2]);
if( (Istart[0] >= 0) && (Istart[0] + Idirn[0] < m_NumberOfVoxelsInX) &&
(Istart[1] >= 0) && (Istart[1] + Idirn[1] < m_NumberOfVoxelsInY) &&
m_TotalRayVoxelPlanes--;
}
- Istart[0] = (int) vcl_floor(m_RayVoxelStartPosition[0]
+ Istart[0] = (int) std::floor(m_RayVoxelStartPosition[0]
+ m_TotalRayVoxelPlanes*m_VoxelIncrement[0]);
- Istart[1] = (int) vcl_floor(m_RayVoxelStartPosition[1]
+ Istart[1] = (int) std::floor(m_RayVoxelStartPosition[1]
+ m_TotalRayVoxelPlanes*m_VoxelIncrement[1]);
- Istart[2] = (int) vcl_floor(m_RayVoxelStartPosition[2]
+ Istart[2] = (int) std::floor(m_RayVoxelStartPosition[2]
+ m_TotalRayVoxelPlanes*m_VoxelIncrement[2]);
if( (Istart[0] >= 0) && (Istart[0] + Idirn[0] < m_NumberOfVoxelsInX) &&
switch( m_TraversalDirection ) {
case TRANSVERSE_IN_X: {
- y = m_Position3Dvox[1] - vcl_floor(m_Position3Dvox[1]);
- z = m_Position3Dvox[2] - vcl_floor(m_Position3Dvox[2]);
+ y = m_Position3Dvox[1] - std::floor(m_Position3Dvox[1]);
+ z = m_Position3Dvox[2] - std::floor(m_Position3Dvox[2]);
break;
}
case TRANSVERSE_IN_Y: {
- y = m_Position3Dvox[0] - vcl_floor(m_Position3Dvox[0]);
- z = m_Position3Dvox[2] - vcl_floor(m_Position3Dvox[2]);
+ y = m_Position3Dvox[0] - std::floor(m_Position3Dvox[0]);
+ z = m_Position3Dvox[2] - std::floor(m_Position3Dvox[2]);
break;
}
case TRANSVERSE_IN_Z: {
- y = m_Position3Dvox[0] - vcl_floor(m_Position3Dvox[0]);
- z = m_Position3Dvox[1] - vcl_floor(m_Position3Dvox[1]);
+ y = m_Position3Dvox[0] - std::floor(m_Position3Dvox[0]);
+ z = m_Position3Dvox[1] - std::floor(m_Position3Dvox[1]);
break;
}
default: {
RayCastHelper<TInputImage, TCoordRep>
::IncrementIntensities(double increment)
{
- short inc = (short) vcl_floor(increment + 0.5);
+ short inc = (short) std::floor(increment + 0.5);
if (! m_ValidRay) {
return;
#define CLITKAFFINEREGISTRATIONGENERICFILTER_CXX
#include "clitkAffineRegistrationGenericFilter.h"
+// clitk include
+#include "clitkIO.h"
+#include "clitkCommon.h"
+#include "clitkImageCommon.h"
+#include "clitkAffineRegistration_ggo.h"
+#include "clitkImageArithm_ggo.h"
+#include "clitkCorrelationRatioImageToImageMetric.h"
+#include "clitkTransformUtilities.h"
+#include "clitkGenericMetric.h"
+#include "clitkGenericOptimizer.h"
+#include "clitkGenericInterpolator.h"
+#include "clitkGenericAffineTransform.h"
+#include "clitkImageToImageGenericFilter.h"
+
+
+//itk include
+#include <itkMultiResolutionImageRegistrationMethod.h>
+#include <itkMultiResolutionPyramidImageFilter.h>
+#include <itkImageToImageMetric.h>
+#include <itkEuler2DTransform.h>
+#include <itkCenteredEuler3DTransform.h>
+#include <itkImage.h>
+#include <itkResampleImageFilter.h>
+#include <itkCastImageFilter.h>
+#include <itkNormalizeImageFilter.h>
+#include <itkDiscreteGaussianImageFilter.h>
+#include <itkImageMaskSpatialObject.h>
+#include <itkCommand.h>
+#include <itkCheckerBoardImageFilter.h>
+#include <itkSubtractImageFilter.h>
+#include <itkLightObject.h>
+#include <itkImageMomentsCalculator.h>
+#include <itkThresholdImageFilter.h>
+
+// other includes
+#include <time.h>
+#include <iostream>
+#include <iomanip>
+
namespace clitk
{
#define CLITKAFFINEREGISTRATIONGENERICFILTER_H
// clitk include
-#include "clitkIO.h"
-#include "clitkCommon.h"
-#include "clitkImageCommon.h"
#include "clitkAffineRegistration_ggo.h"
-#include "clitkImageArithm_ggo.h"
-#include "clitkCorrelationRatioImageToImageMetric.h"
-#include "clitkTransformUtilities.h"
-#include "clitkGenericMetric.h"
-#include "clitkGenericOptimizer.h"
-#include "clitkGenericInterpolator.h"
-#include "clitkGenericAffineTransform.h"
#include "clitkImageToImageGenericFilter.h"
-//itk include
-#include <itkMultiResolutionImageRegistrationMethod.h>
-#include <itkMultiResolutionPyramidImageFilter.h>
-#include <itkImageToImageMetric.h>
-#include <itkEuler2DTransform.h>
-#include <itkCenteredEuler3DTransform.h>
-#include <itkImage.h>
-#include <itkResampleImageFilter.h>
-#include <itkCastImageFilter.h>
-#include <itkNormalizeImageFilter.h>
-#include <itkDiscreteGaussianImageFilter.h>
-#include <itkImageMaskSpatialObject.h>
-#include <itkCommand.h>
-#include <itkCheckerBoardImageFilter.h>
-#include <itkSubtractImageFilter.h>
-#include <itkLightObject.h>
-#include <itkImageMomentsCalculator.h>
-#include <itkThresholdImageFilter.h>
-
-// other includes
-#include <time.h>
-#include <iostream>
-#include <iomanip>
+
namespace clitk
{
// when spline order is even.
// The valid interval for evaluation is [start+offset, last-offset)
// when spline order is odd.
- // Where offset = vcl_floor(spline / 2 ).
+ // Where offset = std::floor(spline / 2 ).
// Note that the last pixel is not included in the valid region
// with odd spline orders.
typename RegionType::SizeType size = m_GridRegion.GetSize();
//check in which bin the fixed value belongs, get the index
const double fixedImageBinTerm = (fixedValue - m_FixedImageMin) / m_FixedImageBinSize;
- const unsigned int fixedImageBinIndex = static_cast<unsigned int>( vcl_floor(fixedImageBinTerm ) );
+ const unsigned int fixedImageBinIndex = static_cast<unsigned int>( std::floor(fixedImageBinTerm ) );
//adapt the measures per bin
this->m_mMSVPB[fixedImageBinIndex]+=movingSquaredValue;
this->m_mSMVPB[fixedImageBinIndex]+=movingValue;
typename MovingImageType::IndexType mappedIndex;
for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
- mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+ mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
}
const GradientPixelType gradient =
typename MovingImageType::IndexType mappedIndex;
for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
- mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+ mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
}
const GradientPixelType gradient =
#include "itkImageRegionIterator.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkNumericTraits.h"
+#if ITK_VERSION_MAJOR <= 4
#include "itkSimpleFastMutexLock.h"
+#else
+#include <mutex>
+#endif
#include "itkImageMaskSpatialObject.h"
namespace clitk
#include "itkRecursiveMultiResolutionPyramidImageFilter.h"
#include "itkImageRegionIterator.h"
-#include "vnl/vnl_math.h"
namespace clitk {
m_CurrentLevel = 0;
m_StopRegistrationFlag = false;
- unsigned int movingLevel = vnl_math_min( (int) m_CurrentLevel,
+ unsigned int movingLevel = std::min( (int) m_CurrentLevel,
(int) m_MovingImagePyramid->GetNumberOfLevels() );
- unsigned int fixedLevel = vnl_math_min( (int) m_CurrentLevel,
+ unsigned int fixedLevel = std::min( (int) m_CurrentLevel,
(int) m_FixedImagePyramid->GetNumberOfLevels() );
DeformationFieldPointer tempField = ITK_NULLPTR;
// Increment level counter.
m_CurrentLevel++;
- movingLevel = vnl_math_min( (int) m_CurrentLevel,
+ movingLevel = std::min( (int) m_CurrentLevel,
(int) m_MovingImagePyramid->GetNumberOfLevels() );
- fixedLevel = vnl_math_min( (int) m_CurrentLevel,
+ fixedLevel = std::min( (int) m_CurrentLevel,
(int) m_FixedImagePyramid->GetNumberOfLevels() );
// We can release data from pyramid which are no longer required.
const float scaleFactor = static_cast<float>( m_Schedule[ level ][ dim ] );
size[ dim ] = static_cast<typename SizeType::SizeValueType>(
- vcl_floor(static_cast<float>( inputSize[ dim ] ) / scaleFactor ) );
+ std::floor(static_cast<float>( inputSize[ dim ] ) / scaleFactor ) );
if( size[ dim ] < 1 )
{
size[ dim ] = 1;
}
start[ dim ] = static_cast<typename IndexType::IndexValueType>(
- vcl_ceil(static_cast<float>( inputStart[ dim ] ) / scaleFactor ) );
+ std::ceil(static_cast<float>( inputStart[ dim ] ) / scaleFactor ) );
}
m_RegionPyramid[ level ].SetSize( size );
m_RegionPyramid[ level ].SetIndex( start );
#include "itkPoint.h"
#include "itkIndex.h"
-#include "itkMultiThreader.h"
-
namespace clitk
{
}
- const RealType denom = -1.0 * vcl_sqrt(sff * smm );
+ const RealType denom = -1.0 * std::sqrt(sff * smm );
MeasureType measure;
if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0) {
measure = sfm / denom;
}
- m_Denom = -1.0 * vcl_sqrt(m_SFF * m_SMM );
+ m_Denom = -1.0 * std::sqrt(m_SFF * m_SMM );
MeasureType measure;
if( this->m_NumberOfPixelsCounted > 0 && m_Denom != 0.0) {
measure = m_SFM / m_Denom;
#include "itkPoint.h"
#include "itkIndex.h"
-#include "itkMultiThreader.h"
-
namespace clitk
{
}
- const RealType denom = -1.0 * vcl_sqrt(sff * smm );
+ const RealType denom = -1.0 * std::sqrt(sff * smm );
MeasureType measure;
if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0) {
measure = sfm / denom;
}
- m_Denom = -1.0 * vcl_sqrt(m_SFF * m_SMM );
+ m_Denom = -1.0 * std::sqrt(m_SFF * m_SMM );
MeasureType measure;
if( this->m_NumberOfPixelsCounted > 0 && m_Denom != 0.0) {
measure = m_SFM / m_Denom;
#include "itkShrinkImageFilter.h"
#include "itkIdentityTransform.h"
-#include "vnl/vnl_math.h"
-
namespace clitk
{
factors[idim] = this->GetSchedule()[ilevel][idim] /
this->GetSchedule()[ilevel+1][idim];
}
- variance[idim] = vnl_math_sqr( 0.5 *
+ variance[idim] = std::sqr( 0.5 *
static_cast<float>( factors[idim] ) );
if( factors[idim] != 1 )
{
if( factors[idim] > 1 )
{
oper->SetDirection( idim );
- oper->SetVariance( vnl_math_sqr( 0.5 *
+ oper->SetVariance( std::sqr( 0.5 *
static_cast<float>( factors[idim] ) ) );
oper->CreateDirectional();
radius[idim] = oper->GetRadius()[idim];
if( factors[idim] > 1 )
{
oper->SetDirection( idim );
- oper->SetVariance( vnl_math_sqr( 0.5 *
+ oper->SetVariance( std::sqr( 0.5 *
static_cast<float>( factors[idim] ) ) );
oper->CreateDirectional();
radius[idim] = oper->GetRadius()[idim];
requestedIndex[idim] += radius[idim];
// take into account shrink component
- requestedSize[idim] = static_cast<SizeValueType>( vcl_floor(
+ requestedSize[idim] = static_cast<SizeValueType>( std::floor(
static_cast<double>(requestedSize[idim]) /
static_cast<double>(factors[idim]) ) );
if( requestedSize[idim] < 1 )
{
requestedSize[idim] = 1;
}
- requestedIndex[idim] = static_cast<IndexValueType>( vcl_ceil(
+ requestedIndex[idim] = static_cast<IndexValueType>( std::ceil(
static_cast<double>(requestedIndex[idim]) /
static_cast<double>(factors[idim]) ) );
for( idim = 0; idim < TInputImage::ImageDimension; idim++ )
{
oper->SetDirection(idim);
- oper->SetVariance( vnl_math_sqr( 0.5 * static_cast<float>(
+ oper->SetVariance( std::sqr( 0.5 * static_cast<float>(
this->GetSchedule()[refLevel][idim] ) ) );
oper->SetMaximumError( this->GetMaximumError() );
oper->CreateDirectional();
// when spline order is even.
// The valid interval for evaluation is [start+offset, last-offset)
// when spline order is odd.
- // Where offset = vcl_floor(spline / 2 ).
+ // Where offset = std::floor(spline / 2 ).
// Note that the last pixel is not included in the valid region
// with odd spline orders.
typename RegionType::SizeType size = m_PaddedGridRegion.GetSize();
const float scaleFactor = static_cast<float>( schedule[ level ][ dim ] );
size[ dim ] = static_cast<typename SizeType::SizeValueType>(
- vcl_floor(static_cast<float>( inputSize[ dim ] ) / scaleFactor ) );
+ std::floor(static_cast<float>( inputSize[ dim ] ) / scaleFactor ) );
if( size[ dim ] < 1 )
{
size[ dim ] = 1;
}
start[ dim ] = static_cast<typename IndexType::IndexValueType>(
- vcl_ceil(static_cast<float>( inputStart[ dim ] ) / scaleFactor ) );
+ std::ceil(static_cast<float>( inputStart[ dim ] ) / scaleFactor ) );
}
m_FixedImageRegionPyramid[ level ].SetSize( size );
m_FixedImageRegionPyramid[ level ].SetIndex( start );
#include "itkShrinkImageFilter.h"
#include "itkIdentityTransform.h"
-#include "vnl/vnl_math.h"
-
namespace clitk
{
// schedule[level-1] );
if( level > 0 )
{
- m_Schedule[level][dim] = vnl_math_min( m_Schedule[level][dim], m_Schedule[level-1][dim] );
+ m_Schedule[level][dim] = std::min( m_Schedule[level][dim], m_Schedule[level-1][dim] );
}
if( m_Schedule[level][dim] < 1 )
for( idim = 0; idim < ImageDimension; idim++ )
{
factors[idim] = m_Schedule[ilevel][idim];
- variance[idim] = vnl_math_sqr( 0.5 *
+ variance[idim] = std::sqr( 0.5 *
static_cast<float>( factors[idim] ) );
}
outputSpacing[idim] = inputSpacing[idim] * shrinkFactor;
outputSize[idim] = static_cast<SizeValueType>(
- vcl_floor(static_cast<double>(inputSize[idim]) / shrinkFactor ) );
+ std::floor(static_cast<double>(inputSize[idim]) / shrinkFactor ) );
if( outputSize[idim] < 1 ) { outputSize[idim] = 1; }
outputStartIndex[idim] = static_cast<IndexValueType>(
- vcl_ceil(static_cast<double>(inputStartIndex[idim]) / shrinkFactor ) );
+ std::ceil(static_cast<double>(inputStartIndex[idim]) / shrinkFactor ) );
}
//Now compute the new shifted origin for the updated levels;
const typename OutputImageType::PointType::VectorType outputOriginOffset
double factor = static_cast<double>( m_Schedule[ilevel][idim] );
outputSize[idim] = static_cast<SizeValueType>(
- vcl_floor(static_cast<double>(baseSize[idim]) / factor ) );
+ std::floor(static_cast<double>(baseSize[idim]) / factor ) );
if( outputSize[idim] < 1 ) { outputSize[idim] = 1; }
outputIndex[idim] = static_cast<IndexValueType>(
- vcl_ceil(static_cast<double>(baseIndex[idim]) / factor ) );
+ std::ceil(static_cast<double>(baseIndex[idim]) / factor ) );
}
for( idim = 0; idim < TInputImage::ImageDimension; idim++ )
{
oper->SetDirection(idim);
- oper->SetVariance( vnl_math_sqr( 0.5 * static_cast<float>(
+ oper->SetVariance( std::sqr( 0.5 * static_cast<float>(
m_Schedule[refLevel][idim] ) ) );
oper->SetMaximumError( m_MaximumError );
oper->CreateDirectional();
#include "itkBSplineDeformableTransform.h"
#include "itkArray2D.h"
-#include "itkMultiThreader.h"
-
namespace itk
{
// check for non-zero bin contribution
if( jointPDFValue > 1e-16 && movingImagePDFValue > 1e-16 ) {
- double pRatio = vcl_log(jointPDFValue / movingImagePDFValue );
+ double pRatio = std::log(jointPDFValue / movingImagePDFValue );
if( fixedImagePDFValue > 1e-16) {
- sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue ) );
+ sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue ) );
}
} // end if-block to check non-zero bin contribution
// check for non-zero bin contribution
if( jointPDFValue > 1e-16 && movingImagePDFValue > 1e-16 ) {
- double pRatio = vcl_log(jointPDFValue / movingImagePDFValue );
+ double pRatio = std::log(jointPDFValue / movingImagePDFValue );
if( fixedImagePDFValue > 1e-16) {
- sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue ) );
+ sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue ) );
}
if( this->m_UseExplicitPDFDerivatives ) {
#include "itkPoint.h"
#include "itkIndex.h"
-#include "itkMultiThreader.h"
-
namespace itk
{