QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsrasterresampler.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterresampler.h
3  --------------------
4  begin : December 2011
5  copyright : (C) 2011 by Marco Hugentobler
6  email : marco at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRASTERRESAMPLER_H
19 #define QGSRASTERRESAMPLER_H
20 
21 #include <QString>
22 #include "qgis.h"
23 
24 class QImage;
25 
30 class CORE_EXPORT QgsRasterResampler
31 {
32 #ifdef SIP_RUN
35 #endif
36 
37 
38 #ifdef SIP_RUN
40  if ( dynamic_cast<QgsBilinearRasterResampler *>( sipCpp ) != NULL )
41  sipType = sipType_QgsBilinearRasterResampler;
42  else if ( dynamic_cast<QgsCubicRasterResampler *>( sipCpp ) != NULL )
43  sipType = sipType_QgsCubicRasterResampler;
44  else
45  sipType = 0;
46  SIP_END
47 #endif
48 
49  public:
50  virtual ~QgsRasterResampler() = default;
51  virtual void resample( const QImage &srcImage, QImage &dstImage ) = 0;
52 
57  virtual QString type() const = 0;
58 
64  virtual QgsRasterResampler *clone() const = 0 SIP_FACTORY;
65 };
66 
67 #endif // QGSRASTERRESAMPLER_H
Interface for resampling rasters (e.g.
#define SIP_END
Definition: qgis_sip.h:182
#define SIP_FACTORY
Definition: qgis_sip.h:69
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165