WRAP_CLASS("itk::DeformableSimplexMesh3DFilter")

  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_SM${m}${d}S}${ITKM_SM${m}${d}S}"  "${ITKT_SM${m}${d}S},${ITKT_SM${m}${d}S}")
      WRAP_TEMPLATE("${ITKM_SM${m}${d}D}${ITKM_SM${m}${d}D}"  "${ITKT_SM${m}${d}D},${ITKT_SM${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("Iterations" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the number of iterations for deformation process.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetIterations();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetIterations( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Alpha" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set scalar factor for internal force. Typically 0.01 < alpha < 0.3.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetAlpha();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetAlpha( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Beta" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set scalar factor for external force. Typically 0.01 < beta < 1.0.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetBeta();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetBeta( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Gamma" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set reference metrics update scaling factor. Low values (< 0.03) produce more regular mesh. Higher values (0.2 < gamma < 0.3) will allow to move the vertices to regions of higher curvature.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetGamma();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetGamma( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Damping" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set reference metrics update scaling factor.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetDamping();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetDamping( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Rigidity" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set parameter to control smoothness of the mesh. Low values (0 or 1) allow areas with high curvature. Higher values (around 7 or 8) will make the mesh smoother.")
    SET(MANAGED_PROPERTY_TYPE      "unsigned int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetRigidity();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetRigidity( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("ImageWidth" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get the image width.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetImageWidth();")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("ImageHeight" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get the image height.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetImageHeight();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("ImageDepth" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get the image depth.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetImageDepth();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Step" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get current iteration number.")
    SET(MANAGED_PROPERTY_TYPE      "int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetStep();")
  END_MANAGED_PROPERTY()

END_WRAP_CLASS()
