/*=========================================================================

Program:   VMTK 

  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
  See LICENSE file for details.

  Portions of this code are covered under the VTK copyright.
  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm 
  for details.

  Portions of this code are covered under the ITK copyright.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm
  for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

/**
 * @class   vtkvmtkBoundedReciprocalImageFilter
 * @brief   Wraps itk::BoundedReciprocalImageFilter.
 * @ingroup Segmentation
 *
 * vtkvmtkBoundedReciprocalImageFilter applies the pointwise mapping 1 / (1 + x) to every pixel of
 * the (internally float-cast) input image, producing an output bounded in (0, 1]: large input values
 * (e.g. high gradient magnitude) map to values near 0, while small input values map to values near 1.
 * It takes no parameters. This is one of the ways the vmtkimagefeatures pype script turns a gradient
 * magnitude image into a feature/speed image suitable for level-set segmentation, where low speed
 * near vessel edges (high gradient) helps stop front propagation.
 *
 * @sa vtkvmtkSigmoidImageFilter, vtkvmtkGradientMagnitudeImageFilter
 */

#ifndef __vtkvmtkBoundedReciprocalImageFilter_h
#define __vtkvmtkBoundedReciprocalImageFilter_h

#include "vtkSimpleImageToImageFilter.h"
#include "vtkvmtkWin32Header.h"

class VTK_VMTK_SEGMENTATION_EXPORT vtkvmtkBoundedReciprocalImageFilter : public vtkSimpleImageToImageFilter
{
 public:
  static vtkvmtkBoundedReciprocalImageFilter *New();
  vtkTypeMacro(vtkvmtkBoundedReciprocalImageFilter, vtkSimpleImageToImageFilter);

protected:

  vtkvmtkBoundedReciprocalImageFilter() {};
  ~vtkvmtkBoundedReciprocalImageFilter() {};

  virtual void SimpleExecute(vtkImageData* input, vtkImageData* output) override;

  //BTX
  //typedef itk::BoundedReciprocalImageFilter<Superclass::InputImageType,Superclass::OutputImageType> ImageFilterType;
  //vtkvmtkBoundedReciprocalImageFilter() : Superclass ( ImageFilterType::New() ){};
  //~vtkvmtkBoundedReciprocalImageFilter() {};
  //ImageFilterType* GetImageFilterPointer() { return dynamic_cast<ImageFilterType*> ( m_Filter.GetPointer() ); }
  //ETX

private:
  vtkvmtkBoundedReciprocalImageFilter(const vtkvmtkBoundedReciprocalImageFilter&);  // Not implemented.
  void operator=(const vtkvmtkBoundedReciprocalImageFilter&);  // Not implemented.

};

#endif




