]> Creatis software - clitk.git/blobdiff - vv/vvMidPosition.cxx
Merge branch 'master' of /home/dsarrut/clitk3.server
[clitk.git] / vv / vvMidPosition.cxx
index 8e715e7abc1d8fcadfef2337f945cf419593f641..b4582e2275cb52ae8a59375329b537eda3fcfb11 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 #include <QApplication>
 
 #include <itkWarpImageFilter.h>
@@ -108,7 +108,11 @@ vvImage::Pointer WarpRefImage(OutputVFType::Pointer vf,vvImage::Pointer image,in
 
   typename FilterType::Pointer warp_filter = FilterType::New();
   warp_filter->SetInput(input);
+#if ITK_VERSION_MAJOR >= 4
+  warp_filter->SetDisplacementField(resampler->GetOutput());
+#else
   warp_filter->SetDeformationField(resampler->GetOutput());
+#endif
   warp_filter->SetOutputSpacing(input->GetSpacing());
   warp_filter->SetOutputOrigin(input->GetOrigin());
   warp_filter->SetOutputSize(input->GetLargestPossibleRegion().GetSize());