WRAP_CLASS("itk::DeformableMesh3DFilter")

  WRAP_INCLUDE_TYPE("itkDefaultStaticMeshTraits.h")
  WRAP_INCLUDE_TYPE("itkDefaultDynamicMeshTraits.h")

  SET(MANAGED_TYPE_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedMeshToMeshFilter_TYPE.cxx.in)
  SET(MANAGED_WRAPPER_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedMeshToMeshFilter_WRAPPER.cxx.in)

  FOREACH(d "3")
    FOREACH(m ${WRAP_ITK_MESH_PIXELS})
      WRAP_TEMPLATE("${ITKM_M${m}${d}S}${ITKM_M${m}${d}S}"  "${ITKT_M${m}${d}S},${ITKT_M${m}${d}S}")
      WRAP_TEMPLATE("${ITKM_M${m}${d}D}${ITKM_M${m}${d}D}"  "${ITKT_M${m}${d}D},${ITKT_M${m}${d}D}")
    ENDFOREACH(m)
  ENDFOREACH(d)
  
  BEGIN_MANAGED_METHOD("SetGradient")
    SET(MANAGED_METHOD_SUMMARY         "Set the gradient image.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkImageBase^ gradient")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->SetGradient( reinterpret_cast<NativeType::GradientImageType*>(gradient->NativePointer.ToPointer()) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->SetGradient( gradient );")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("GetGradient")
    SET(MANAGED_METHOD_SUMMARY         "Get the gradient image.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkImageBase^ gradient")
    SET(MANAGED_METHOD_TYPE_BODY       "gradient->NativePointer = IntPtr((NativeType::GradientImageType*)m_PointerToNative->GetGradient( ));")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->GetGradient( gradient );")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_PROPERTY("StepThreshold" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the step threshold which determines when the model stops deforming.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetStepThreshold();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetStepThreshold( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("TimeStep" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the time step.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetTimeStep();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetTimeStep( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("PotentialMagnitude" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set the potential magnitude value.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetPotentialMagnitude() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetPotentialMagnitude( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("GradientMagnitude" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set the gradient magnitude value.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetGradientMagnitude() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetGradientMagnitude( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("PotentialOn" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set the potential on parameter.")
    SET(MANAGED_PROPERTY_TYPE      "unsigned short")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetPotentialOn();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetPotentialOn( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("ObjectLabel" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set the object label parameter.")
    SET(MANAGED_PROPERTY_TYPE      "unsigned char")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetObjectLabel();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetObjectLabel( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Scale" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set the three dimensional double array containing scale parameters.")
    SET(MANAGED_PROPERTY_TYPE      "itkArray<double>^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedCovariantVector<double, 3>( m_PointerToNative->GetScale() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetScale( itk::ManagedTypes::ToNativeCovariantVector<double, 3>(value) );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Stiffness" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the two dimensional double array containing stiffness parameters.")
    SET(MANAGED_PROPERTY_TYPE      "itkArray<double>^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedCovariantVector<double, 2>( m_PointerToNative->GetStiffness() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetStiffness( itk::ManagedTypes::ToNativeCovariantVector<double, 2>(value) );")
  END_MANAGED_PROPERTY()
  
  #TODO: StiffnessMatrix method

END_WRAP_CLASS()
