title: SimpleITK Resize images
body: <p>I have a set o 3D volumes that I am reading with <code>SimpleITK</code></p>
  
  <pre><code>import SimpleITK as sitk
  for filename in filenames:
      image = sitk.ReadImage(filename)
  </code></pre>
  
  <p>Each of the volumes has different size, spacing, origin and direction. This code yields different values for different images:</p>
  
  <pre><code>print(image.GetSize())
  print(image.GetOrigin())
  print(image.GetSpacing())
  print(image.GetDirection())
  </code></pre>
  
  <p>My question is: how do I transform the images to have the same size and spacing so that they all have the same resolution and size when converted to <code>numpy</code> arrays. Something like:</p>
  
  <pre><code>import SimpleITK as sitk
  for filename in filenames:
      image = sitk.ReadImage(filename)
      image = transform(image, fixed_size, fixed_spacing)
      array = sitk.GetArrayFromImage(image)
  </code></pre>