fast_morphology/
lib.rs

1/*
2 * Copyright (c) Radzivon Bartoshyk. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification,
5 * are permitted provided that the following conditions are met:
6 *
7 * 1.  Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * 2.  Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * 3.  Neither the name of the copyright holder nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29#![allow(clippy::too_many_arguments)]
30extern crate core;
31
32mod arena;
33mod arena_roi;
34#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), feature = "avx"))]
35mod avx;
36mod border_mode;
37mod difference;
38#[cfg(feature = "image")]
39mod dynamic_image;
40mod filter;
41mod filter_1d;
42mod filter_1d_padding;
43mod filter_op_declare;
44mod flat_se;
45mod img_size;
46mod morph_base;
47mod morph_error;
48#[cfg(all(target_arch = "aarch64", feature = "neon"))]
49mod neon;
50mod op;
51mod op_f32;
52mod op_impl;
53mod op_type;
54mod op_u16;
55mod ops;
56mod se_scan;
57#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), feature = "sse"))]
58mod sse;
59mod structuring_element;
60mod thread_policy;
61mod unsafe_slice;
62
63pub use border_mode::{BorderMode, MorphScalar};
64#[cfg(feature = "image")]
65pub use dynamic_image::*;
66pub use filter_1d::{morph_1d_f32, morph_1d_u16, morph_1d_u8};
67pub use img_size::ImageSize;
68pub use op::{
69    dilate, dilate_gray_alpha, dilate_rgb, dilate_rgba, erode, erode_gray_alpha, erode_rgb,
70    erode_rgba, morphology, morphology_gray_alpha, morphology_rgb, morphology_rgba,
71};
72pub use op_f32::{
73    dilate_f32, dilate_gray_alpha_f32, dilate_rgb_f32, dilate_rgba_f32, erode_f32,
74    erode_gray_alpha_f32, erode_rgb_f32, erode_rgba_f32, morphology_rgb_f32, morphology_rgba_f32,
75};
76pub use op_type::MorphExOp;
77pub use op_u16::{
78    dilate_gray_alpha_u16, dilate_rgb_u16, dilate_rgba_u16, dilate_u16, erode_gray_alpha_u16,
79    erode_rgb_u16, erode_rgba_u16, erode_u16, morphology_gray_alpha_u16, morphology_gray_u16,
80    morphology_rgb_u16, morphology_rgba_u16,
81};
82pub use structuring_element::KernelShape;
83pub use thread_policy::MorphologyThreadingPolicy;