neffile.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __NEFFILE_H_
00023 #define __NEFFILE_H_
00024
00025 #include "tiffepfile.h"
00026 #include "huffman.h"
00027 #include <vector>
00028
00029 namespace OpenRaw {
00030
00031 class Thumbnail;
00032
00033 namespace Internals {
00034 class IOFile;
00035 class IFDFileContainer;
00036
00037 class NEFFile
00038 : public TiffEpFile
00039 {
00040 public:
00041 static RawFile *factory(IO::Stream* _f);
00042 NEFFile(IO::Stream * _f);
00043 virtual ~NEFFile();
00044
00048 static bool isCompressed(RawContainer & container, uint32_t offset);
00049
00050 class NEFCompressionInfo {
00051 public:
00052 uint16_t vpred[2][2];
00053 std::vector<uint16_t> curve;
00054 const HuffmanNode* huffman;
00055 };
00056 private:
00057
00058 NEFFile(const NEFFile&);
00059 NEFFile & operator=(const NEFFile &);
00060
00061 virtual ::or_error _getRawData(RawData & data, uint32_t options);
00062 static const IFDFile::camera_ids_t s_def[];
00063 int _getCompressionCurve(RawData&, NEFCompressionInfo&);
00064 ::or_error _decompressNikonQuantized(RawData&);
00065 ::or_error _decompressIfNeeded(RawData&, uint32_t);
00066 };
00067 }
00068
00069 }
00070
00071 #endif