title: Migrating SimpleITK 1.x to 2.x
body: <p>I'm working on a project on GitHub that was made with Python 2.7 (<a href="https://github.com/AIM-Harvard/DeepCAC" rel="nofollow noreferrer">https://github.com/AIM-Harvard/DeepCAC</a>)</p>
  <p>I've made most relevant changes as to update it to Python 3.7, but I'm fixed on an error message regarding simpleITK.</p>
  <p>Error message:</p>
  <pre><code>TypeError: Execute() takes 2 positional arguments but 10 were given
  </code></pre>
  <p>It stems from this code:</p>
  <pre><code>res_filter = sitk.ResampleImageFilter()
  
  ----&gt; img_sitk = res_filter.Execute(img_sitk, curated_size, sitk.Transform(), method, img_sitk.GetOrigin(), curated_spacing, img_sitk.GetDirection(), 0, img_sitk.GetPixelIDValue()) 
  
  </code></pre>
  <p>According to the simpleITK document on switching from 1.x to 2.x (version that is available with python 3.7) it should be done like this (<a href="https://simpleitk.readthedocs.io/en/master/migrationGuide2.0.html#filter-s-execute-method" rel="nofollow noreferrer">https://simpleitk.readthedocs.io/en/master/migrationGuide2.0.html#filter-s-execute-method</a>) but I can't quite grasp it.</p>
  <p>Can someone help out?
  Thanks</p>