WRAP_CLASS("itk::ResampleImageFilter")

  WRAP_IMAGE_FILTER_USIGN_INT(2)
  WRAP_IMAGE_FILTER_SIGN_INT(2)
  WRAP_IMAGE_FILTER_REAL(2)
  
  BEGIN_MANAGED_METHOD("SetTransform")
    SET(MANAGED_METHOD_SUMMARY         "Set the transform.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkTransform^ transform")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->SetTransform( reinterpret_cast<NativeType::TransformType*>(transform->NativePointer.ToPointer()) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->SetTransform( transform );")
  END_MANAGED_METHOD()
  
  SET(body "")
  SET(body "${body}\n\t\t// Set the NativePointer of the given transform")
  SET(body "${body}\n\t\titk::INativePointer^ transformPtr = safe_cast<itk::INativePointer^>(transform);")
  SET(body "${body}\n\t\tNativeType::TransformType* transformItk = const_cast<NativeType::TransformType*>( this->m_PointerToNative->GetTransform() );")
  SET(body "${body}\n\t\ttransformPtr->NativePointer = IntPtr(transformItk);")

  BEGIN_MANAGED_METHOD("GetTransform")
    SET(MANAGED_METHOD_SUMMARY         "Get the transform.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkTransform^ transform")
    SET(MANAGED_METHOD_TYPE_BODY       "${body}")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->GetTransform( transform );")
  END_MANAGED_METHOD()
  
  BEGIN_MANAGED_METHOD("SetInterpolator")
    SET(MANAGED_METHOD_SUMMARY         "Set the interpolator.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkImageFunction^ interpolator")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->SetInterpolator( reinterpret_cast<NativeType::InterpolatorType*>(interpolator->NativePointer.ToPointer()) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->SetInterpolator( interpolator );")
  END_MANAGED_METHOD()

  SET(body "")
  SET(body "${body}\n\t\t// Set the NativePointer of the given interpolator")
  SET(body "${body}\n\t\titk::INativePointer^ interpolatorPtr = safe_cast<itk::INativePointer^>(interpolator);")
  SET(body "${body}\n\t\tNativeType::InterpolatorType* interpolatorItk = const_cast<NativeType::InterpolatorType*>( this->m_PointerToNative->GetInterpolator() );")
  SET(body "${body}\n\t\tinterpolatorPtr->NativePointer = IntPtr(interpolatorItk);")

  BEGIN_MANAGED_METHOD("GetInterpolator")
    SET(MANAGED_METHOD_SUMMARY         "Get the interpolator.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkImageFunction^ interpolator")
    SET(MANAGED_METHOD_TYPE_BODY       "${body}")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->GetInterpolator( interpolator );")
  END_MANAGED_METHOD()
  
  BEGIN_MANAGED_PROPERTY("OutputSize" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the size of the output image to produce.")
    SET(MANAGED_PROPERTY_TYPE      "itkSize^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedSize<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetSize() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetSize( itk::ManagedTypes::ToNativeSize<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("OutputSpacing" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the spacing of the output image to produce.")
    SET(MANAGED_PROPERTY_TYPE      "itkSpacing^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedSpacing<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetOutputSpacing() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetOutputSpacing( itk::ManagedTypes::ToNativeSpacing<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("OutputOrigin" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the origin of the output image to produce.")
    SET(MANAGED_PROPERTY_TYPE      "itkPoint^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPoint<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetOutputOrigin() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetOutputOrigin( itk::ManagedTypes::ToNativePoint<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("DefaultPixelValue" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set default pixel value when a transformed pixel is outside of the image.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetDefaultPixelValue() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetDefaultPixelValue( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()

END_WRAP_CLASS()
