X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkInvertVFFilter.txx;h=c32782f08b84558f1bcf2cc4fa6f59976f94bd4f;hb=c24ade7228f4e5e3d79f74bb4ecbd82963cdbebe;hp=34500a3897e058db1247afc3f1a174526cb5862e;hpb=f3649236e04b19844f8fb55191ff01f64418fc3a;p=clitk.git diff --git a/itk/clitkInvertVFFilter.txx b/itk/clitkInvertVFFilter.txx index 34500a3..c32782f 100644 --- a/itk/clitkInvertVFFilter.txx +++ b/itk/clitkInvertVFFilter.txx @@ -75,11 +75,7 @@ protected: //the actual processing void BeforeThreadedGenerateData(); -#if ITK_VERSION_MAJOR >= 4 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); -#else - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); -#endif //member data typename WeightsImageType::Pointer m_Weights; @@ -117,11 +113,7 @@ void HelperClass1::BeforeThreadedGenerateData() //========================================================================================================================= //update the output for the outputRegionForThread template -#if ITK_VERSION_MAJOR >= 4 void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) -#else -void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) -#endif { // std::cout << "HelperClass1::ThreadedGenerateData - IN " << threadId << std::endl; //Get pointer to the input @@ -145,7 +137,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 +191,7 @@ void HelperClass1::ThreadedGenerateData(const O overlap *= 1.0 - distance[dim]; } upper >>= 1; - + if (neighIndex[dim] >= size[dim]) neighIndex[dim] = size[dim] - 1; } @@ -297,11 +289,7 @@ protected: //the actual processing -#if ITK_VERSION_MAJOR >= 4 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); -#else - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); -#endif //member data typename WeightsImageType::Pointer m_Weights; @@ -320,20 +308,19 @@ protected: //Empty constructor template HelperClass2::HelperClass2() { - m_EdgePaddingValue=itk::NumericTraits::Zero; + PixelType zero; + for(unsigned int i=0;i ::Zero; } //========================================================================================================================= //update the output for the outputRegionForThread -#if ITK_VERSION_MAJOR >= 4 template void HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) -#else -template void HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) -#endif { // std::cout << "HelperClass2::ThreadedGenerateData - IN " << threadId << std::endl; - + //Get pointer to the input typename InputImageType::ConstPointer inputPtr = this->GetInput(); @@ -383,9 +370,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; }