libopenraw
neffile.h
1 /*
2  * libopenraw - neffile.h
3  *
4  * Copyright (C) 2006-2008 Hubert Figuiere
5  * Copyright (C) 2008 Novell, Inc.
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef __NEFFILE_H_
23 #define __NEFFILE_H_
24 
25 #include "tiffepfile.h"
26 #include "huffman.h"
27 #include <vector>
28 
29 namespace OpenRaw {
30 
31  class Thumbnail;
32 
33  namespace Internals {
34  class IOFile;
35  class IFDFileContainer;
36 
37  class NEFFile
38  : public TiffEpFile
39  {
40  public:
41  static RawFile *factory(IO::Stream* _f);
42  NEFFile(IO::Stream * _f);
43  virtual ~NEFFile();
44 
48  static bool isCompressed(RawContainer & container, uint32_t offset);
49 
51  public:
52  uint16_t vpred[2][2];
53  std::vector<uint16_t> curve;
54  const HuffmanNode* huffman;
55  };
56  private:
57 
58  NEFFile(const NEFFile&);
59  NEFFile & operator=(const NEFFile &);
60 
61  virtual ::or_error _getRawData(RawData & data, uint32_t options);
62  static const IFDFile::camera_ids_t s_def[];
63  int _getCompressionCurve(RawData&, NEFCompressionInfo&);
64  ::or_error _decompressNikonQuantized(RawData&);
65  ::or_error _decompressIfNeeded(RawData&, uint32_t);
66  };
67  }
68 
69 }
70 
71 #endif
base virtual class for IO
Definition: stream.h:40
static bool isCompressed(RawContainer &container, uint32_t offset)
Definition: neffile.cpp:97