mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
imgcodecs: apply CV_OVERRIDE/CV_FINAL
This commit is contained in:
parent
5d36ee2fe7
commit
a91953b15c
@ -58,18 +58,18 @@ enum BmpCompression
|
||||
|
||||
|
||||
// Windows Bitmap reader
|
||||
class BmpDecoder : public BaseImageDecoder
|
||||
class BmpDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
BmpDecoder();
|
||||
~BmpDecoder();
|
||||
~BmpDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -83,15 +83,15 @@ protected:
|
||||
|
||||
|
||||
// ... writer
|
||||
class BmpEncoder : public BaseImageEncoder
|
||||
class BmpEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
BmpEncoder();
|
||||
~BmpEncoder();
|
||||
~BmpEncoder() CV_OVERRIDE;
|
||||
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -63,19 +63,19 @@ using namespace Imath;
|
||||
|
||||
/* libpng version only */
|
||||
|
||||
class ExrDecoder : public BaseImageDecoder
|
||||
class ExrDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
ExrDecoder();
|
||||
~ExrDecoder();
|
||||
~ExrDecoder() CV_OVERRIDE;
|
||||
|
||||
int type() const;
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
int type() const CV_OVERRIDE;
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void UpSample( uchar *data, int xstep, int ystep, int xsample, int ysample );
|
||||
@ -103,15 +103,15 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class ExrEncoder : public BaseImageEncoder
|
||||
class ExrEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
ExrEncoder();
|
||||
~ExrEncoder();
|
||||
~ExrEncoder() CV_OVERRIDE;
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
ImageEncoder newEncoder() const;
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ void write_ctable_pixel( const double& pixelValue,
|
||||
/**
|
||||
* Loader for GDAL
|
||||
*/
|
||||
class GdalDecoder : public BaseImageDecoder{
|
||||
class GdalDecoder CV_FINAL : public BaseImageDecoder{
|
||||
|
||||
public:
|
||||
|
||||
@ -115,17 +115,17 @@ class GdalDecoder : public BaseImageDecoder{
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~GdalDecoder();
|
||||
~GdalDecoder() CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Read image data
|
||||
*/
|
||||
bool readData( Mat& img );
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Read the image header
|
||||
*/
|
||||
bool readHeader();
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Close the module
|
||||
@ -135,7 +135,7 @@ class GdalDecoder : public BaseImageDecoder{
|
||||
/**
|
||||
* Create a new decoder
|
||||
*/
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Test the file signature
|
||||
@ -144,7 +144,7 @@ class GdalDecoder : public BaseImageDecoder{
|
||||
* The reason is that GDAL tends to overlap with other image formats and it is probably
|
||||
* safer to use other formats first.
|
||||
*/
|
||||
virtual bool checkSignature( const String& signature ) const;
|
||||
virtual bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -53,14 +53,14 @@ namespace cv
|
||||
{
|
||||
|
||||
// DICOM image reader using GDCM
|
||||
class DICOMDecoder : public BaseImageDecoder
|
||||
class DICOMDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
DICOMDecoder();
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
ImageDecoder newDecoder() const;
|
||||
virtual bool checkSignature( const String& signature ) const;
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
virtual bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -55,34 +55,34 @@ enum HdrCompression
|
||||
};
|
||||
|
||||
// Radiance rgbe (.hdr) reader
|
||||
class HdrDecoder : public BaseImageDecoder
|
||||
class HdrDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
HdrDecoder();
|
||||
~HdrDecoder();
|
||||
bool readHeader();
|
||||
bool readData( Mat& img );
|
||||
bool checkSignature( const String& signature ) const;
|
||||
ImageDecoder newDecoder() const;
|
||||
size_t signatureLength() const;
|
||||
~HdrDecoder() CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
size_t signatureLength() const CV_OVERRIDE;
|
||||
protected:
|
||||
String m_signature_alt;
|
||||
FILE *file;
|
||||
};
|
||||
|
||||
// ... writer
|
||||
class HdrEncoder : public BaseImageEncoder
|
||||
class HdrEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
HdrEncoder();
|
||||
~HdrEncoder();
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
ImageEncoder newEncoder() const;
|
||||
bool isFormatSupported( int depth ) const;
|
||||
~HdrEncoder() CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif/*_GRFMT_HDR_H_*/
|
||||
#endif/*_GRFMT_HDR_H_*/
|
||||
|
@ -53,18 +53,18 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class JpegDecoder : public BaseImageDecoder
|
||||
class JpegDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
JpegDecoder();
|
||||
virtual ~JpegDecoder();
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -77,14 +77,14 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class JpegEncoder : public BaseImageEncoder
|
||||
class JpegEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
JpegEncoder();
|
||||
virtual ~JpegEncoder();
|
||||
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
ImageEncoder newEncoder() const;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -50,17 +50,17 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class Jpeg2KDecoder : public BaseImageDecoder
|
||||
class Jpeg2KDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
Jpeg2KDecoder();
|
||||
virtual ~Jpeg2KDecoder();
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
bool readComponent8u( uchar *data, void *buffer, int step, int cmpt,
|
||||
@ -73,15 +73,15 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class Jpeg2KEncoder : public BaseImageEncoder
|
||||
class Jpeg2KEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
Jpeg2KEncoder();
|
||||
virtual ~Jpeg2KEncoder();
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
ImageEncoder newEncoder() const;
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
bool writeComponent8u( void *img, const Mat& _img );
|
||||
|
@ -59,19 +59,19 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class PAMDecoder : public BaseImageDecoder
|
||||
class PAMDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
PAMDecoder();
|
||||
virtual ~PAMDecoder();
|
||||
virtual ~PAMDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
|
||||
size_t signatureLength() const;
|
||||
bool checkSignature( const String& signature ) const;
|
||||
ImageDecoder newDecoder() const;
|
||||
size_t signatureLength() const CV_OVERRIDE;
|
||||
bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -82,18 +82,18 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class PAMEncoder : public BaseImageEncoder
|
||||
class PAMEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
PAMEncoder();
|
||||
virtual ~PAMEncoder();
|
||||
virtual ~PAMEncoder() CV_OVERRIDE;
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* _OPENCV_PAM_HPP_ */
|
||||
#endif /* _OPENCV_PAM_HPP_ */
|
||||
|
@ -51,18 +51,18 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class PngDecoder : public BaseImageDecoder
|
||||
class PngDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
PngDecoder();
|
||||
virtual ~PngDecoder();
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -78,16 +78,16 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class PngEncoder : public BaseImageEncoder
|
||||
class PngEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
PngEncoder();
|
||||
virtual ~PngEncoder();
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
static void writeDataToBuf(void* png_ptr, uchar* src, size_t size);
|
||||
|
@ -57,20 +57,20 @@ enum PxMMode
|
||||
PXM_TYPE_PPM = 3 // color format
|
||||
};
|
||||
|
||||
class PxMDecoder : public BaseImageDecoder
|
||||
class PxMDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
PxMDecoder();
|
||||
virtual ~PxMDecoder();
|
||||
virtual ~PxMDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
size_t signatureLength() const;
|
||||
bool checkSignature( const String& signature ) const;
|
||||
ImageDecoder newDecoder() const;
|
||||
size_t signatureLength() const CV_OVERRIDE;
|
||||
bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -82,16 +82,16 @@ protected:
|
||||
int m_maxval;
|
||||
};
|
||||
|
||||
class PxMEncoder : public BaseImageEncoder
|
||||
class PxMEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
PxMEncoder(PxMMode mode);
|
||||
virtual ~PxMEncoder();
|
||||
virtual ~PxMEncoder() CV_OVERRIDE;
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE
|
||||
{
|
||||
return makePtr<PxMEncoder>(mode_);
|
||||
}
|
||||
|
@ -64,18 +64,18 @@ enum SunRasMapType
|
||||
|
||||
|
||||
// Sun Raster Reader
|
||||
class SunRasterDecoder : public BaseImageDecoder
|
||||
class SunRasterDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
SunRasterDecoder();
|
||||
virtual ~SunRasterDecoder();
|
||||
virtual ~SunRasterDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -89,15 +89,15 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class SunRasterEncoder : public BaseImageEncoder
|
||||
class SunRasterEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
SunRasterEncoder();
|
||||
virtual ~SunRasterEncoder();
|
||||
virtual ~SunRasterEncoder() CV_OVERRIDE;
|
||||
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -90,20 +90,20 @@ enum TiffFieldType
|
||||
|
||||
|
||||
// libtiff based TIFF codec
|
||||
class TiffDecoder : public BaseImageDecoder
|
||||
class TiffDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
TiffDecoder();
|
||||
virtual ~TiffDecoder();
|
||||
virtual ~TiffDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readHeader();
|
||||
bool readData( Mat& img );
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
void close();
|
||||
bool nextPage();
|
||||
bool nextPage() CV_OVERRIDE;
|
||||
|
||||
size_t signatureLength() const;
|
||||
bool checkSignature( const String& signature ) const;
|
||||
ImageDecoder newDecoder() const;
|
||||
size_t signatureLength() const CV_OVERRIDE;
|
||||
bool checkSignature( const String& signature ) const CV_OVERRIDE;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void* m_tif;
|
||||
@ -119,19 +119,19 @@ private:
|
||||
};
|
||||
|
||||
// ... and writer
|
||||
class TiffEncoder : public BaseImageEncoder
|
||||
class TiffEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
TiffEncoder();
|
||||
virtual ~TiffEncoder();
|
||||
virtual ~TiffEncoder() CV_OVERRIDE;
|
||||
|
||||
bool isFormatSupported( int depth ) const;
|
||||
bool isFormatSupported( int depth ) const CV_OVERRIDE;
|
||||
|
||||
bool write( const Mat& img, const std::vector<int>& params );
|
||||
bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;
|
||||
|
||||
bool writemulti(const std::vector<Mat>& img_vec, const std::vector<int>& params);
|
||||
bool writemulti(const std::vector<Mat>& img_vec, const std::vector<int>& params) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void writeTag( WLByteStream& strm, TiffTag tag,
|
||||
|
@ -52,36 +52,36 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class WebPDecoder : public BaseImageDecoder
|
||||
class WebPDecoder CV_FINAL : public BaseImageDecoder
|
||||
{
|
||||
public:
|
||||
|
||||
WebPDecoder();
|
||||
~WebPDecoder();
|
||||
~WebPDecoder() CV_OVERRIDE;
|
||||
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
bool readData( Mat& img ) CV_OVERRIDE;
|
||||
bool readHeader() CV_OVERRIDE;
|
||||
void close();
|
||||
|
||||
size_t signatureLength() const;
|
||||
bool checkSignature( const String& signature) const;
|
||||
size_t signatureLength() const CV_OVERRIDE;
|
||||
bool checkSignature( const String& signature) const CV_OVERRIDE;
|
||||
|
||||
ImageDecoder newDecoder() const;
|
||||
ImageDecoder newDecoder() const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
Mat data;
|
||||
int channels;
|
||||
};
|
||||
|
||||
class WebPEncoder : public BaseImageEncoder
|
||||
class WebPEncoder CV_FINAL : public BaseImageEncoder
|
||||
{
|
||||
public:
|
||||
WebPEncoder();
|
||||
~WebPEncoder();
|
||||
~WebPEncoder() CV_OVERRIDE;
|
||||
|
||||
bool write(const Mat& img, const std::vector<int>& params);
|
||||
bool write(const Mat& img, const std::vector<int>& params) CV_OVERRIDE;
|
||||
|
||||
ImageEncoder newEncoder() const;
|
||||
ImageEncoder newEncoder() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
protected:
|
||||
virtual pos_type seekoff( off_type offset,
|
||||
std::ios_base::seekdir dir,
|
||||
std::ios_base::openmode )
|
||||
std::ios_base::openmode ) CV_OVERRIDE
|
||||
{
|
||||
char* whence = eback();
|
||||
if (dir == std::ios_base::cur)
|
||||
|
Loading…
Reference in New Issue
Block a user