libopenraw
|
00001 /* 00002 * libopenraw - rawdata.h 00003 * 00004 * Copyright (C) 2007-2008 Hubert Figuiere 00005 * Copyright (C) 2008 Novell, Inc. 00006 * 00007 * This library is free software: you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License 00009 * as published by the Free Software Foundation, either version 3 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library. If not, see 00019 * <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 00023 #ifndef __OPENRAW_RAWDATA_H__ 00024 #define __OPENRAW_RAWDATA_H__ 00025 00026 #include <vector> 00027 00028 #include <libopenraw/libopenraw.h> 00029 #include <libopenraw++/bitmapdata.h> 00030 00031 00032 namespace OpenRaw { 00033 00034 class RawData 00035 : public BitmapData 00036 { 00037 public: 00038 typedef or_cfa_pattern CfaPattern; 00039 static RawData * getAndExtractRawData(const char* filename, 00040 uint32_t options, 00041 or_error & err); 00042 00043 RawData(); 00044 virtual ~RawData(); 00045 00046 uint16_t min(); 00047 uint16_t max(); 00048 void setMin(uint16_t _m); 00049 void setMax(uint16_t _m); 00050 00052 void swap(RawData & with); 00053 00054 virtual void *allocData(const size_t s); 00055 virtual void setDimensions(uint32_t x, uint32_t y); 00056 void setCfaPattern(CfaPattern t); 00057 CfaPattern cfaPattern(); 00058 uint32_t compression(); 00059 void setCompression(uint32_t c); 00060 00061 00062 void setSlices(const std::vector<uint16_t> & slices); 00063 00065 // BitmapData &append(uint8_t c); 00067 RawData &append(uint16_t c); 00069 void nextRow(); 00070 private: 00071 class Private; 00072 RawData::Private *d; 00073 00075 RawData(const RawData& f); 00077 RawData & operator=(const RawData&); 00078 }; 00079 00080 } 00081 00082 /* 00083 Local Variables: 00084 mode:c++ 00085 c-file-style:"stroustrup" 00086 c-file-offsets:((innamespace . 0)) 00087 indent-tabs-mode:nil 00088 fill-column:80 00089 End: 00090 */ 00091 #endif