otbClassificationMapMosaicFilter.h 2.78 KB
Newer Older
Cresson Remi's avatar
Cresson Remi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
#ifndef __ClassificationMapMosaicFilter_H
#define __ClassificationMapMosaicFilter_H

#include "otbStreamingMosaicFilterBase.h"

namespace otb
{
/** \class ClassificationMapMosaicFilter
 * \brief Computes the mosaic of an input classification map set.
 *
 * \ingroup MLUtils
 */
template <class TInputImage, class TOutputImage=TInputImage, class TInternalValueType=double>
class ITK_EXPORT ClassificationMapMosaicFilter : public otb::StreamingMosaicFilterBase<TInputImage, TOutputImage,
                                                                                     TInternalValueType>
{
public:

  /** Standard Self typedef */
  typedef ClassificationMapMosaicFilter                                                   Self;
  typedef otb::StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType> Superclass;
  typedef itk::SmartPointer<Self>                                                       Pointer;
  typedef itk::SmartPointer<const Self>                                                 ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Runtime information support. */
  itkTypeMacro(ClassificationMapMosaicFilter, StreamingMosaicFilterBase);

  /** Input image typedefs.  */
  typedef typename Superclass::InputImageType          InputImageType;
  typedef typename Superclass::InputImagePixelType     InputImagePixelType;
  typedef typename Superclass::IteratorType            IteratorType;
  typedef typename Superclass::InterpolatorPointerType InterpolatorPointerType;
  typedef typename Superclass::InputImageRegionType    InputImageRegionType;

  /** Output image typedefs.  */
  typedef typename Superclass::OutputImageType              OutputImageType;
  typedef typename Superclass::OutputImagePointType         OutputImagePointType;
  typedef typename Superclass::OutputImagePixelType         OutputImagePixelType;
  typedef typename Superclass::OutputImageInternalPixelType OutputImageInternalPixelType;
  typedef typename Superclass::OutputImageRegionType        OutputImageRegionType;

  /** Internal computing typedef support. */
  typedef typename Superclass::InternalValueType InternalValueType;
  typedef typename Superclass::InternalPixelType InternalPixelType;

protected:
  ClassificationMapMosaicFilter() {
  }

  virtual ~ClassificationMapMosaicFilter() {
  }

  /** Overrided methods */
  virtual void GenerateOutputInformation(void);
  virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );

private:
  ClassificationMapMosaicFilter(const Self&); //purposely not implemented
  void operator=(const Self&);              //purposely not implemented

}; // end of class

} // end namespace otb

#ifndef OTB_MANUAL_INSTANTIATION
#include "otbClassificationMapMosaicFilter.txx"
#endif

#endif