1
#ifndef COLOR_FILTER_ARRAY_H
2
#define COLOR_FILTER_ARRAY_H
4
#include "RawDecoderException.h"
6
RawSpeed - RAW file decoder.
8
Copyright (C) 2009 Klaus Post
10
This library is free software; you can redistribute it and/or
11
modify it under the terms of the GNU Lesser General Public
12
License as published by the Free Software Foundation; either
13
version 2 of the License, or (at your option) any later version.
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Lesser General Public License for more details.
20
You should have received a copy of the GNU Lesser General Public
21
License along with this library; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
http://www.klauspost.com
50
class ColorFilterArray
53
ColorFilterArray(void);
54
ColorFilterArray(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right);
55
virtual ~ColorFilterArray(void);
56
void setCFA(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right);
57
void setColorAt(iPoint2D pos, CFAColor c);
58
void setCFA(uchar8 dcrawCode);
59
__inline CFAColor getColorAt(uint32 x, uint32 y) {return cfa[(x&1)+((y&1)<<1)];}
60
uint32 toDcrawColor(CFAColor c);
61
uint32 getDcrawFilter();
64
std::string asString();
65
static std::string colorToString(CFAColor c);
70
} // namespace RawSpeed