Skip to main content

rxing/common/
mod.rs

1pub mod detector;
2pub mod reedsolomon;
3
4use crate::Point;
5
6#[cfg(test)]
7pub mod test_utils;
8
9#[cfg(test)]
10mod StringUtilsTestCase;
11
12#[cfg(test)]
13mod BitArrayTestCase;
14
15#[cfg(test)]
16mod hybrid_binarizer_test_case;
17
18#[cfg(test)]
19mod adaptive_threshold_binarizer_test_case;
20
21#[cfg(test)]
22pub(crate) mod bit_matrix_test_case;
23
24#[cfg(test)]
25mod BitSourceTestCase;
26
27#[cfg(test)]
28mod PerspectiveTransformTestCase;
29
30pub mod string_utils;
31
32mod bit_array;
33pub use bit_array::*;
34
35pub type Result<T, E = crate::Exceptions> = std::result::Result<T, E>;
36
37/*
38 * Copyright 2007 ZXing authors
39 *
40 * Licensed under the Apache License, Version 2.0 (the "License");
41 * you may not use this file except in compliance with the License.
42 * You may obtain a copy of the License at
43 *
44 *      http://www.apache.org/licenses/LICENSE-2.0
45 *
46 * Unless required by applicable law or agreed to in writing, software
47 * distributed under the License is distributed on an "AS IS" BASIS,
48 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49 * See the License for the specific language governing permissions and
50 * limitations under the License.
51 */
52
53// package com.google.zxing.common;
54
55// import com.google.zxing.Point;
56
57/**
58 * <p>Encapsulates the result of detecting a barcode in an image. This includes the raw
59 * matrix of black/white pixels corresponding to the barcode, and possibly points of interest
60 * in the image, like the location of finder patterns or corners of the barcode in the image.</p>
61 *
62 * @author Sean Owen
63 */
64pub trait DetectorRXingResult {
65    fn getBits(&self) -> &BitMatrix;
66
67    fn getPoints(&self) -> &[Point];
68}
69
70// pub struct DetectorRXingResult {
71//     bits: BitMatrix,
72//     points: Vec<Point>,
73// }
74
75mod bit_matrix;
76pub use bit_matrix::*;
77
78mod eci_input;
79pub use eci_input::*;
80
81mod bit_source;
82pub use bit_source::*;
83
84mod perspective_transform;
85pub use perspective_transform::*;
86
87mod decoder_rxing_result;
88pub use decoder_rxing_result::*;
89
90mod bit_source_builder;
91pub use bit_source_builder::*;
92
93mod grid_sampler;
94pub use grid_sampler::*;
95
96mod default_grid_sampler;
97pub use default_grid_sampler::*;
98
99mod character_set;
100pub use character_set::*;
101
102mod eci_string_builder;
103pub use eci_string_builder::*;
104
105mod eci_encoder_set;
106pub use eci_encoder_set::*;
107
108mod minimal_eci_input;
109pub use minimal_eci_input::*;
110
111mod global_histogram_binarizer;
112pub use global_histogram_binarizer::*;
113
114mod hybrid_binarizer;
115pub use hybrid_binarizer::*;
116
117mod eci;
118pub use eci::*;
119
120mod quad;
121pub use quad::*;
122
123pub mod cpp_essentials;
124
125mod line_orientation;
126pub use line_orientation::LineOrientation;
127
128#[cfg(feature = "otsu_level")]
129mod otsu_level_binarizer;
130#[cfg(feature = "otsu_level")]
131pub use otsu_level_binarizer::*;
132
133#[cfg(feature = "image")]
134mod adaptive_threshold_binarizer;
135#[cfg(feature = "image")]
136pub use adaptive_threshold_binarizer::*;
137
138pub type BitFieldBaseType = usize;
139pub const BIT_FIELD_BASE_BITS: usize = BitFieldBaseType::BITS as usize;
140pub const BIT_FIELD_SHIFT_BITS: usize = BIT_FIELD_BASE_BITS - 1;
141
142#[cfg(feature = "experimental_features")]
143mod bitmatrix_sources;
144
145mod pattern_reader;