WRAP_CLASS("itk::ThresholdImageFilter")

  WRAP_IMAGE_FILTER_USIGN_INT(1)
  WRAP_IMAGE_FILTER_SIGN_INT(1)
  WRAP_IMAGE_FILTER_REAL(1)

  BEGIN_MANAGED_PROPERTY("OutsideValue" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the value for all pixels outside the given range.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetOutsideValue() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetOutsideValue( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("Upper" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the upper threshold for the segmentation.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetUpper() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetUpper( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Lower" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the lower threshold for the segmentation.")
    SET(MANAGED_PROPERTY_TYPE      "itkPixel^")
    SET(MANAGED_PROPERTY_GET_BODY  "return itk::ManagedTypes::ToManagedPixel<NativeType::PixelType>( m_PointerToNative->GetLower() );")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetLower( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( value ) );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_METHOD("ThresholdAbove")
    SET(MANAGED_METHOD_SUMMARY         "The values greater than or equal to the value are set to OutsideValue.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkPixel^ thresh")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->ThresholdAbove( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( thresh ) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->ThresholdAbove(thresh);")
  END_MANAGED_METHOD()
  
  BEGIN_MANAGED_METHOD("ThresholdBelow")
    SET(MANAGED_METHOD_SUMMARY         "The values less than or equal to the value are set to OutsideValue.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkPixel^ thresh")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->ThresholdBelow( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( thresh ) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->ThresholdBelow(thresh);")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("ThresholdOutside")
    SET(MANAGED_METHOD_SUMMARY         "The values outside the range are set to OutsideValue.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkPixel^ lower, itkPixel^ upper")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->ThresholdOutside( itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( lower ), itk::ManagedTypes::ToNativePixel<NativeType::PixelType>( upper ) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->ThresholdOutside(lower, upper);")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_PROPERTY("CanRunInPlace" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get if the filter can run in place. To do so, the filter's first input and output must have the same dimension and pixel type. This property can be used in conjunction with InPlace to determine whether a particular use of the filter is really running in place. Some filters may be able to optimize their operation if the InPlace is true and CanRunInPlace is true.")
    SET(MANAGED_PROPERTY_TYPE      "bool")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->CanRunInPlace();")
  END_MANAGED_PROPERTY()
  
  BEGIN_MANAGED_PROPERTY("InPlace" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set if the filter will run in place. In place operation can be turned on and off. This only has an effect when the input and output image type match.")
    SET(MANAGED_PROPERTY_TYPE      "bool")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetInPlace();")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetInPlace( value );")
  END_MANAGED_PROPERTY()

END_WRAP_CLASS()
