X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkShapedBLUTSpatioTemporalDIRGenericFilter.txx;h=0ef06ab69267e988f01b9821dc44ee6e31485a14;hb=20c4d89862ca9a9f4be92f312db7c6572e24075e;hp=5434b228f470c0ba02ae2efe8aca47d43ce9e1f8;hpb=08d1fd56ac1d08bd228d9e557f5472a395e9b708;p=clitk.git diff --git a/registration/clitkShapedBLUTSpatioTemporalDIRGenericFilter.txx b/registration/clitkShapedBLUTSpatioTemporalDIRGenericFilter.txx index 5434b22..0ef06ab 100644 --- a/registration/clitkShapedBLUTSpatioTemporalDIRGenericFilter.txx +++ b/registration/clitkShapedBLUTSpatioTemporalDIRGenericFilter.txx @@ -623,7 +623,7 @@ namespace clitk typename MetricType::Pointer metric=genericMetric->GetMetricPointer(); if (movingMask) metric->SetMovingImageMask(movingMask); -#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS +#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 if (threadsGiven) metric->SetNumberOfThreads( threads ); #else if (m_Verbose) std::cout<<"Not setting the number of threads (not compiled with USE_OPTIMIZED_REGISTRATION_METHODS)..."< WarpFilterType; typename WarpFilterType::Pointer warp = WarpFilterType::New(); +#if ITK_VERSION_MAJOR >= 4 + warp->SetDisplacementField( field4D ); +#else warp->SetDeformationField( field4D ); +#endif warp->SetInput( movingImageReader->GetOutput() ); warp->SetOutputOrigin( fixedImage->GetOrigin() ); warp->SetOutputSpacing( fixedImage->GetSpacing() );