From: David Sarrut Date: Mon, 17 Feb 2014 14:48:08 +0000 (+0100) Subject: Replace "itk::NumericTraits::Zero" with explicit initialisation (for macos) X-Git-Tag: v1.4.0~16^2~10^2~13 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d2264227eb56300989795b8fd305cc3e1cfbe081;p=clitk.git Replace "itk::NumericTraits::Zero" with explicit initialisation (for macos) --- diff --git a/itk/clitkInvertVFFilter.txx b/itk/clitkInvertVFFilter.txx index 34500a3..e26fed7 100644 --- a/itk/clitkInvertVFFilter.txx +++ b/itk/clitkInvertVFFilter.txx @@ -145,7 +145,7 @@ void HelperClass1::ThreadedGenerateData(const O typedef typename OutputImageType::PixelType DisplacementType; DisplacementType displacement; inputIt.GoToBegin(); - + typename OutputImageType::SizeType size = outputPtr->GetLargestPossibleRegion().GetSize(); //define some temp variables @@ -199,7 +199,7 @@ void HelperClass1::ThreadedGenerateData(const O overlap *= 1.0 - distance[dim]; } upper >>= 1; - + if (neighIndex[dim] >= size[dim]) neighIndex[dim] = size[dim] - 1; } @@ -320,7 +320,10 @@ protected: //Empty constructor template HelperClass2::HelperClass2() { - m_EdgePaddingValue=itk::NumericTraits::Zero; + PixelType zero; + for(unsigned int i=0;i ::Zero; } @@ -333,7 +336,7 @@ template void HelperClass2GetInput(); @@ -383,9 +386,9 @@ template void HelperClass2 InvertVFFilter::InvertVFFilter() { - m_EdgePaddingValue=itk::NumericTraits::Zero; //no other reasonable value? + + //m_EdgePaddingValue=itk::NumericTraits::Zero; //no other reasonable value? + PixelType zero; + for(unsigned int i=0;i void InvertVFFilterSetNthOutput(0, helper2->GetOutput()); - + //std::cout << "InvertVFFilter::GenerateData - OUT" << std::endl; } diff --git a/vv/vvMidPosition.cxx b/vv/vvMidPosition.cxx index b4582e2..f91422a 100644 --- a/vv/vvMidPosition.cxx +++ b/vv/vvMidPosition.cxx @@ -172,7 +172,8 @@ itk::Image,3>::Pointer AverageField(itk::Image::Zero; + VFPixelType zeroVector;//=itk::NumericTraits::Zero; + for(unsigned int i=0;i