2012-06-14 14:07:53 +02:00
|
|
|
class QgsRasterResampler
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsrasterresampler.h"
|
|
|
|
#include "qgsbilinearrasterresampler.h"
|
|
|
|
#include "qgscubicrasterresampler.h"
|
|
|
|
|
|
|
|
%End
|
|
|
|
|
|
|
|
%ConvertToSubClassCode
|
|
|
|
if (dynamic_cast<QgsBilinearRasterResampler*>(sipCpp) != NULL)
|
|
|
|
sipClass = sipClass_QgsBilinearRasterResampler;
|
|
|
|
else if (dynamic_cast<QgsCubicRasterResampler*>(sipCpp) != NULL)
|
|
|
|
sipClass = sipClass_QgsCubicRasterResampler;
|
|
|
|
else
|
|
|
|
sipClass = 0;
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void resample( const QImage& srcImage, QImage& dstImage ) = 0;
|
|
|
|
virtual QString type() const = 0;
|
2012-08-16 17:05:29 +02:00
|
|
|
virtual QgsRasterResampler * clone() const = 0;
|
2012-06-14 14:07:53 +02:00
|
|
|
};
|
|
|
|
|
2012-06-14 19:21:06 +03:00
|
|
|
class QgsBilinearRasterResampler: QgsRasterResampler
|
2012-06-14 14:07:53 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsbilinearrasterresampler.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsBilinearRasterResampler();
|
|
|
|
~QgsBilinearRasterResampler();
|
|
|
|
|
|
|
|
void resample( const QImage& srcImage, QImage& dstImage );
|
|
|
|
QString type() const;
|
2012-08-16 17:05:29 +02:00
|
|
|
QgsRasterResampler * clone() const;
|
2012-06-14 14:07:53 +02:00
|
|
|
};
|
|
|
|
|
2012-06-14 19:21:06 +03:00
|
|
|
class QgsCubicRasterResampler: QgsRasterResampler
|
2012-06-14 14:07:53 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgscubicrasterresampler.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsCubicRasterResampler();
|
|
|
|
~QgsCubicRasterResampler();
|
|
|
|
void resample( const QImage& srcImage, QImage& dstImage );
|
|
|
|
QString type() const;
|
2012-08-16 17:05:29 +02:00
|
|
|
QgsRasterResampler * clone() const;
|
2012-06-14 14:07:53 +02:00
|
|
|
};
|