WRAP_CLASS("itk::TriangleMeshToBinaryImageFilter")

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

  SET(MANAGED_TYPE_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedImageSource_TYPE.cxx.in)
  SET(MANAGED_WRAPPER_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedImageSource_WRAPPER.cxx.in)

  FOREACH(d "3")
    FOREACH(m ${WRAP_ITK_MESH_PIXELS})
      FOREACH(i ${WRAP_ITK_SCALAR})
        WRAP_TEMPLATE("${ITKM_M${m}${d}S}${ITKM_I${i}${d}}"  "${ITKT_M${m}${d}S},${ITKT_I${i}${d}}")
        WRAP_TEMPLATE("${ITKM_M${m}${d}D}${ITKM_I${i}${d}}"  "${ITKT_M${m}${d}D},${ITKT_I${i}${d}}")
      ENDFOREACH(i)
    ENDFOREACH(m)
  ENDFOREACH(d)

  BEGIN_MANAGED_PROPERTY("OutsideValue" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the value for pixels outside the mesh. By default, this filter will return an image. If this 'outside' value is changed to a non-null value, the output produced by this filter will be a mask with inside/outside values specified by the user.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::OutputImageType::PixelType>( m_PointerToNative->GetOutsideValue() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetOutsideValue( itk::ManagedTypes::ToNativePixel<NativeType::OutputImageType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("InsideValue" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the value for pixels inside the mesh. By default, this filter will return an image. If this 'inside' value is changed to a non-null value, the output produced by this filter will be a mask with inside/outside values specified by the user.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::OutputImageType::PixelType>( m_PointerToNative->GetInsideValue() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetInsideValue( itk::ManagedTypes::ToNativePixel<NativeType::OutputImageType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Spacing" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the spacing of the output image.")
    SET(MANAGED_PROPERTY_TYPE      "itkSpacing^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedSpacing<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetSpacing() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetSpacing( itk::ManagedTypes::ToNativeSpacing<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Origin" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the origin of the output image.")
    SET(MANAGED_PROPERTY_TYPE      "itkPoint^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPoint<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetOrigin() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetOrigin( itk::ManagedTypes::ToNativePoint<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Size" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the size of the output image.")
    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("Index" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the index of the output image.")
    SET(MANAGED_PROPERTY_TYPE      "itkIndex^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedIndex<NativeType::OutputImageType::ImageDimension>( m_PointerToNative->GetIndex() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetIndex( itk::ManagedTypes::ToNativeIndex<NativeType::OutputImageType::ImageDimension>(value) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Tolerance" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the tolerance for doing spatial searches of the polydata.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetTolerance();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetTolerance( value );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_METHOD("SetInput")
    SET(MANAGED_METHOD_SUMMARY         "Set the mesh input of this process object.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itk::itkMeshBase^ input")
    SET(MANAGED_METHOD_TYPE_BODY       "this->m_PointerToNative->SetInput( (NativeType::InputMeshType*)input->NativePointer.ToPointer() );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->SetInput( input );")
  END_MANAGED_METHOD()
  
  BEGIN_MANAGED_METHOD("GetInput")
    SET(MANAGED_METHOD_SUMMARY         "Get the mesh input of this process object.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkMeshBase^ input")
    SET(MANAGED_METHOD_TYPE_BODY       "input->NativePointer = IntPtr((NativeType::InputMeshType*)m_PointerToNative->GetInput( ));")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->GetInput( input );")
  END_MANAGED_METHOD()

END_WRAP_CLASS()
