Path: blob/master/modules/imgcodecs/src/grfmt_pfm.hpp
16337 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.34#ifndef _GRFMT_PFM_H_5#define _GRFMT_PFM_H_67#include "grfmt_base.hpp"8#include "bitstrm.hpp"910#ifdef HAVE_IMGCODEC_PFM11namespace cv12{1314class PFMDecoder CV_FINAL : public BaseImageDecoder15{16public:17PFMDecoder();18virtual ~PFMDecoder() CV_OVERRIDE;1920bool readData( Mat& img ) CV_OVERRIDE;21bool readHeader() CV_OVERRIDE;22void close();2324size_t signatureLength() const CV_OVERRIDE;25bool checkSignature( const String& signature ) const CV_OVERRIDE;26ImageDecoder newDecoder() const CV_OVERRIDE27{28return makePtr<PFMDecoder>();29}3031private:32RLByteStream m_strm;33double m_scale_factor;34bool m_swap_byte_order;35};3637class PFMEncoder CV_FINAL : public BaseImageEncoder38{39public:40PFMEncoder();41virtual ~PFMEncoder() CV_OVERRIDE;4243bool isFormatSupported( int depth ) const CV_OVERRIDE;44bool write( const Mat& img, const std::vector<int>& params ) CV_OVERRIDE;4546ImageEncoder newEncoder() const CV_OVERRIDE47{48return makePtr<PFMEncoder>();49}50};5152}5354#endif // HAVE_IMGCODEC_PXM5556#endif/*_GRFMT_PFM_H_*/5758