Converted tabs to spaces.
[zxing.git] / cpp / core / src / zxing / Binarizer.h
1 #ifndef BINARIZER_H_
2 #define BINARIZER_H_
3
4 /*
5  *  Binarizer.h
6  *  zxing
7  *
8  *  Copyright 2010 ZXing authors All rights reserved.
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *      http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22
23 #include <zxing/LuminanceSource.h>
24 #include <zxing/common/BitArray.h>
25 #include <zxing/common/BitMatrix.h>
26 #include <zxing/common/Counted.h>
27
28 namespace zxing {
29
30 class Binarizer : public Counted {
31  private:
32   Ref<LuminanceSource> source_;
33
34  public:
35   Binarizer(Ref<LuminanceSource> source);
36   virtual ~Binarizer();
37
38   virtual Ref<BitArray> getBlackRow(int y, Ref<BitArray> row) = 0;
39   virtual Ref<BitMatrix> getBlackMatrix() = 0;
40
41   Ref<LuminanceSource> getLuminanceSource() const ;
42   virtual Ref<Binarizer> createBinarizer(Ref<LuminanceSource> source) = 0;
43 };
44
45 }
46 #endif /* BINARIZER_H_ */