diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
new file mode 100644
index 0000000..4f9d7cf
--- /dev/null
+++ b/.github/workflows/wheels.yml
@@ -0,0 +1,155 @@
+name: Build
+
+on: [ push, pull_request ]
+
+jobs:
+ linux-x86_64:
+ name: Build Wheels on Linux (x86_64)
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ include:
+ - build: Python 3.10 x86_64
+ python: cp310-manylinux_x86_64
+ arch: x86_64
+ - build: Python 3.11 x86_64
+ python: cp311-manylinux_x86_64
+ arch: x86_64
+ - build: Python 3.12 x86_64
+ python: cp312-manylinux_x86_64
+ arch: x86_64
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Install cibuildwheel
+ run: python -m pip install cibuildwheel==2.20.0
+ - name: Build Wheel
+ run: python -m cibuildwheel --output-dir wheelhouse
+ env:
+ CIBW_BUILD: ${{ matrix.python }}
+ CIBW_ARCHS: ${{ matrix.arch }}
+ CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
+ CIBW_BUILD_VERBOSITY: 1
+ CIBW_TEST_COMMAND: 'pip install "numpy>= 1.24, <2" && time python -c "import numpy as np;from chromatic_aberration_correction import correct_chromatic_aberration;RGB = np.random.random([2160, 3840, 3]).astype(np.float32);correct_chromatic_aberration(RGB, 4, 4, np.array([-0.25, 1.375, -0.125], np.float32), 15.0 / 255, 0.5, 1.0, 1.0, 0.25, 128.0 / 255, 64.0 / 255)"'
+ - uses: actions/upload-artifact@v4
+ with:
+ name: cibw-wheels-${{ matrix.python }}
+ path: ./wheelhouse/*.whl
+
+ linux-arm64:
+ name: Build Wheels on Linux (ARM64)
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ include:
+ - build: Python 3.10 ARM64
+ python: cp310-manylinux_aarch64
+ arch: aarch64
+ - build: Python 3.11 ARM64
+ python: cp311-manylinux_aarch64
+ arch: aarch64
+ - build: Python 3.12 ARM64
+ python: cp312-manylinux_aarch64
+ arch: aarch64
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Setup QEMU
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: all
+ - name: Install cibuildwheel
+ run: python -m pip install cibuildwheel==2.20.0
+ - name: Build Wheel
+ run: python -m cibuildwheel --output-dir wheelhouse
+ env:
+ CIBW_BUILD: ${{ matrix.python }}
+ CIBW_ARCHS: ${{ matrix.arch }}
+ CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux }}
+ CIBW_BUILD_VERBOSITY: 1
+ CIBW_TEST_COMMAND: 'pip install "numpy>= 1.24, <2" && time python -c "import numpy as np;from chromatic_aberration_correction import correct_chromatic_aberration;RGB = np.random.random([2160, 3840, 3]).astype(np.float32);correct_chromatic_aberration(RGB, 4, 4, np.array([-0.25, 1.375, -0.125], np.float32), 15.0 / 255, 0.5, 1.0, 1.0, 0.25, 128.0 / 255, 64.0 / 255)"'
+ - uses: actions/upload-artifact@v4
+ with:
+ name: cibw-wheels-${{ matrix.python }}
+ path: ./wheelhouse/*.whl
+
+ macos-arm64:
+ name: Build Wheels on macOS (ARM64)
+ runs-on: macos-latest
+
+ strategy:
+ matrix:
+ include:
+ - build: Python 3.10 ARM64
+ python: cp310-macosx_arm64
+ arch: arm64
+ - build: Python 3.11 ARM64
+ python: cp311-macosx_arm64
+ arch: arm64
+ - build: Python 3.12 ARM64
+ python: cp312-macosx_arm64
+ arch: arm64
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Install Dependencies
+ run: |
+ brew install libomp llvm
+ - name: Environment Variables
+ run: |
+ echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV
+ echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
+ - name: Install cibuildwheel
+ run: python -m pip install cibuildwheel==2.20.0
+ - name: Build Wheel
+ run: python -m cibuildwheel --output-dir wheelhouse
+ env:
+ CIBW_BUILD: ${{ matrix.python }}
+ CIBW_ARCHS: ${{ matrix.arch }}
+ CIBW_BUILD_VERBOSITY: 1
+ CIBW_TEST_COMMAND: 'pip install "numpy>= 1.24, <2" && time python -c "import numpy as np;from chromatic_aberration_correction import correct_chromatic_aberration;RGB = np.random.random([2160, 3840, 3]).astype(np.float32);correct_chromatic_aberration(RGB, 4, 4, np.array([-0.25, 1.375, -0.125], np.float32), 15.0 / 255, 0.5, 1.0, 1.0, 0.25, 128.0 / 255, 64.0 / 255)"'
+ - uses: actions/upload-artifact@v4
+ with:
+ name: cibw-wheels-${{ matrix.python }}
+ path: ./wheelhouse/*.whl
+
+ sdist:
+ name: Build Sdist
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Install Package Dependencies
+ run: python -m pip install build twine
+ - name: Build Sdist
+ run: python -m build . --sdist
+ - name: Check Sdist
+ run: python -m twine check dist/*
+ - uses: actions/upload-artifact@v4
+ with:
+ name: cibw-sdist
+ path: dist/*.tar.gz
+
+ upload-pypi:
+ name: Upload to Pypi
+ needs: [linux-x86_64, linux-arm64, macos-arm64, sdist]
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
+ steps:
+ - uses: actions/setup-python@v5
+ - uses: actions/download-artifact@v4
+ with:
+ pattern: cibw-*
+ path: dist
+ merge-multiple: true
+ - uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
+ repository-url: https://test.pypi.org/legacy/
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6ada7c1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.pyc
+*.pyo
+.DS_Store
+poetry.lock
+/build/
+/dist/
+__pycache__
diff --git a/README.md b/README.md
index b19741a..f5c7c48 100644
--- a/README.md
+++ b/README.md
@@ -1,59 +1,91 @@
# Blind Chromatic Aberration Correction with False Color Filtering
-| | |
-|:----------------------------------------------------:|:-----------------------------------------------------:|
-| Aberrated image | Filtered result |
+| | |
+|:--------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------:|
+| Aberrated image | Filtered result |
+This repository contains a non-official [Cython](https://cython.org) implementation of the IEEE Transactions on Image Processing 2013 article [Correction of Axial and Lateral Chromatic Aberration With False Color Filter](https://ieeexplore.ieee.org/document/6357254) by Joonyoung Chang, Hee Kang and Moon Gi Kang.
-This is a repository containing a non-official Cython-based implementation of the IEEE Transactions on Image
-Processing 2013 article *Correction of Axial and Lateral Chromatic Aberration With False Color Filter* by
-Joonyoung Chang, Hee Kang and Moon Gi Kang.
+The method consists in a 1D filter independently run on the columns and rows of an image containing chromatic aberrations. Merging the horizontally and vertically filtered outputs yields the final restored image. Our implementation leverages the multi-threading abilities of Cython to achieve restoration on large images in less than 1 second.
-The method consists in a 1D filter independently run on the columns and rows of an image containing chromatic
-aberrations. Merging the horizontally and vertically filtered outputs yields the final restored image. Our
-implementation leverages the multi-threading abilities of Cython to achieve restoration on large images in less
-than 1 second.
+This implementation is part of an [IPOL](https://www.ipol.im) paper describing in the detail the method. If this code is useful to your research, please cite our paper [paper](https://www.ipol.im/pub/art/2023/443/article.pdf).
-This implementation is part of an IPOL paper describing in the detail the method. If this code is useful to your
-research please cite our paper [paper (to appear)][demo]
+## News
-### News
+10/19: Try the [online demo](https://ipolcore.ipol.im/demo/clientApp/demo.html?id=443) using the code!
-10/19: Try the online demo using this code!
+## Requirements
-### Testing the code
+### macOS
-You can test the code with a test JPEG image containing chromatic aberrations. First, compile Cython code
-and install the python package with
-> bash compile_cython.sh
+To benefit from parallelism, [OpenMP](https://openmp.llvm.org) needs to be installed alongside [LLVM](https://llvm.org).
+Assuming [Homebrew](https://brew.sh) is available, their installation is as follows:
+
+```bash
+brew install libomp llvm
+```
-This will create in the *chromatic_aberration_filtering* directory a filter_cython.c file. The file is already shipped with this code. If you do not want
-to run cython, simply set to False the *USE_CYTHON* argument in setup.py. Second, you can restore the image with the command line:
-> python main.py
+The following [Poetry](https://python-poetry.org) command can be used to install the remaining build requirements:
-This will save a 8-bit PNG file containing the restored image. The method can be also used on 16-bit TIFF images
-or straight after demosaicking/denoising in a typical ISP pipeline.
+```bash
+poetry install
+```
-### Requirements
+## Configuring
-Please run the pip install command below to install the requirements:
-> pip install requirements.txt
+[Meson](https://mesonbuild.com/) is used to build the Cython extension, the project can be configured as follows:
-### Description
+```bash
+poetry run meson build
+```
-The code contains two main modules: filter.py that is a numpy-pure implemention of the paper (and is extremely slow),
-and filter_cython.pyx that contains the sources for the Cython implementation (recommanded).
+## Building an Editable Build
-After installation/compilation, you can import in any project this code by importing the package
-> import chromatic_aberration_filtering
+### macOS
-The actual function is
-> chromatic_aberration_filtering.chromatic_removal
+```bash
+CC=$(brew --prefix llvm)/bin/clang poetry run pip install --no-build-isolation --editable .
+```
-Please refer to main.py to see an example of use.
+The **Cython** extension will be installed in the **Poetry** virtual environement and available for import.
-### Contact
+## Building a Wheel
-If you encounter any problem with the code, please contact me at .
+### macOS
+
+```bash
+CC=$(brew --prefix llvm)/bin/clang poetry run python -m build
+```
+
+The **wheel** will be available in the `dist` directory.
+
+## Usage
+
+The **Cython** extension can be imported as follows:
+
+```python
+import chromatic_aberration_correction
+```
+
+Then the function to correct chromatic aberration is available to use:
+
+```python
+chromatic_aberration_correction.correct_chromatic_aberration
+```
+
+Examples are available in the examples directory: [examples/example_correction.py](examples/example_correction.py)
+
+Note that on macOS, for best performance, it is recommended to set the number of *OpenMP* threads to 1:
+
+```bash
+export OMP_NUM_THREADS=1
+```
+
+## Contact
+
+If you encounter any problem with the code, please use the following contacts:
+
+-
+-
diff --git a/chromatic_aberration_filtering/__init__.py b/chromatic_aberration_filtering/__init__.py
index 9b55430..727685a 100644
--- a/chromatic_aberration_filtering/__init__.py
+++ b/chromatic_aberration_filtering/__init__.py
@@ -1 +1,5 @@
-from .filter_cython import chromatic_removal
+from .chromatic_aberration_correction import correct_chromatic_aberration
+
+chromatic_removal = correct_chromatic_aberration
+
+__all__ = ["correct_chromatic_aberration"]
diff --git a/chromatic_aberration_filtering/filter_cython.pyx b/chromatic_aberration_filtering/chromatic_aberration_correction.pyx
similarity index 81%
rename from chromatic_aberration_filtering/filter_cython.pyx
rename to chromatic_aberration_filtering/chromatic_aberration_correction.pyx
index 175ad38..4594926 100644
--- a/chromatic_aberration_filtering/filter_cython.pyx
+++ b/chromatic_aberration_filtering/chromatic_aberration_correction.pyx
@@ -1,3 +1,11 @@
+"""
+Correction of Axial and Lateral Chromatic Aberration With False Color Filter
+
+References
+----------
+- :cite:`Eboli2013` : Eboli, T. (2023). Fast Chromatic Aberration Correction with 1D Filters. Image Processing On Line, 13, 198–214. doi:10.5201/ipol.2023.443
+"""
+
import numpy as np
cimport cython
@@ -9,6 +17,10 @@ cimport numpy as np
from cython.parallel cimport prange
from libc.math cimport fmin, fmax, fabs
+__all__ = ["correct_chromatic_aberration"]
+
+__version__ = "0.1.0.dev2"
+
# It's necessary to call "import_array" if you use any part of the
# numpy PyArray_* API. From Cython 3, accessing attributes like
# ".shape" on a typed Numpy array use this API. Therefore we recommend
@@ -28,12 +40,25 @@ ctypedef np.uint8_t uint8
@cython.wraparound(False)
@cython.nonecheck(False)
cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X):
+ """
+ Transpose given 2D array :math:`X`.
+
+ Parameters
+ ----------
+ X
+ Input 2D array to be transposed.
+
+ Returns
+ -------
+ ndarray
+ Transposed 2D array.
+ """
+
cdef Py_ssize_t M = X.shape[0]
cdef Py_ssize_t N = X.shape[1]
cdef Py_ssize_t i, j
cdef DTYPE_t[:, ::1] Xt = np.empty((N, M), dtype=DTYPE)
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(0, N, 1):
Xt[j, i] = X[i, j]
@@ -43,9 +68,47 @@ cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X):
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.nonecheck(False)
-def chromatic_removal(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver,
- np.ndarray[DTYPE_t, ndim=1] rho, DTYPE_t tau, DTYPE_t alpha_R, DTYPE_t alpha_B, DTYPE_t beta_R,
- DTYPE_t beta_B, DTYPE_t gamma_1, DTYPE_t gamma_2):
+def correct_chromatic_aberration(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver,
+ np.ndarray[DTYPE_t, ndim=1] rho, DTYPE_t tau, DTYPE_t alpha_R, DTYPE_t alpha_B, DTYPE_t beta_R,
+ DTYPE_t beta_B, DTYPE_t gamma_1, DTYPE_t gamma_2):
+ """
+ Correct chromatic aberration in given input image :math:`I_{in}`.
+
+ Parameters
+ ----------
+ I_in
+ Input image of shape (M, N, 3) with dtype float32.
+ L_hor
+ Half-size of the horizontal 1D slice.
+ L_ver
+ Half-size of the vertical 1D slice.
+ rho
+ Three coefficients for prefiltering in TI stage.
+ tau
+ Threshold on chroma signal in FC stage.
+ alpha_R
+ Regularization parameter for red channel in FC stage.
+ alpha_B
+ Regularization parameter for blue channel in FC stage.
+ beta_R
+ Parameter for red channel in arbitration stage.
+ beta_B
+ Parameter for blue channel in arbitration stage.
+ gamma_1
+ First gamma parameter for arbitration weight calculation.
+ gamma_2
+ Second gamma parameter for arbitration weight calculation.
+
+ Returns
+ -------
+ ndarray
+ Corrected image of shape (M, N, 3) with dtype float32, clipped to [0, 1].
+
+ References
+ ----------
+ :cite:`Eboli2013`
+ """
+
cdef Py_ssize_t M, N, i, j
M = I_in.shape[0]
N = I_in.shape[1]
@@ -55,7 +118,6 @@ def chromatic_removal(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver,
cdef DTYPE_t[:, ::1] G_in = np.empty((M, N), dtype=DTYPE)
cdef DTYPE_t[:, ::1] B_in = np.empty((M, N), dtype=DTYPE)
cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE)
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(0, N, 1):
R_in[i, j] = I_in[i, j, 0]
@@ -146,22 +208,35 @@ def chromatic_removal(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver,
# Final RGB conversion (Eq. (24))
cdef DTYPE_t[:, :, ::1] I_out = np.empty((M, N, 3), dtype=DTYPE)
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(0, N, 1):
I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
I_out[i, j, 1] = G_in[i, j]
I_out[i, j, 2] = K_bout[i, j] + G_in[i, j]
- return np.clip(np.asarray(I_out), 0, 1)
+ return np.asarray(I_out)
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.nonecheck(False)
cdef void grad(DTYPE_t[:, ::1] X, Py_ssize_t M, Py_ssize_t N, DTYPE_t[:, ::1] grad_X) nogil:
+ """
+ Compute the gradient of a 2D array along the second axis.
+
+ Parameters
+ ----------
+ X : ndarray
+ Input 2D array.
+ M : int
+ Number of rows in X.
+ N : int
+ Number of columns in X.
+ grad_X : ndarray
+ Output array to store the computed gradient.
+ """
+
cdef Py_ssize_t i, j
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(1, N, 1):
grad_X[i, j] = X[i, j] - X[i, j - 1]
@@ -171,6 +246,20 @@ cdef void grad(DTYPE_t[:, ::1] X, Py_ssize_t M, Py_ssize_t N, DTYPE_t[:, ::1] gr
@cython.wraparound(False)
@cython.nonecheck(False)
cdef int sign(DTYPE_t input) nogil:
+ """
+ Compute the sign of a given number.
+
+ Parameters
+ ----------
+ input : float
+ Input number.
+
+ Returns
+ -------
+ int
+ 1 if input is positive, -1 if negative, 0 if zero.
+ """
+
if input > 0:
return 1
elif input < 0:
@@ -183,6 +272,22 @@ cdef int sign(DTYPE_t input) nogil:
@cython.wraparound(False)
@cython.nonecheck(False)
cdef DTYPE_t clip(DTYPE_t K, DTYPE_t K_ref) nogil:
+ """
+ Clip given :math:`K` value based on :math:`K_ref` reference value.
+
+ Parameters
+ ----------
+ K
+ Input value to be clipped.
+ K_ref
+ Reference value for clipping.
+
+ Returns
+ -------
+ float
+ Clipped value.
+ """
+
## Compute clip (Eq. (9))
if K_ref > 0:
return fmin(K, K_ref)
@@ -200,21 +305,34 @@ cdef void ti_and_ca_filtering1D(DTYPE_t[:, ::1] X_in, DTYPE_t[:, ::1] G_in, DTYP
DTYPE_t[::1] rho, DTYPE_t alpha_X, DTYPE_t tau, DTYPE_t[:, ::1] K_hor,
DTYPE_t[:, ::1] K_TI_hor, DTYPE_t[:, ::1] X_max, DTYPE_t[:, ::1] X_min):
"""
- 1D separable successive TI and FC 1D filtering.
- Inputs:
- X_in: Input red or blue image
- G_in: Input green image
- Y_in: Input luma image
- L: half-size of the 1D slice
- rho: The three coefficients for prefiltering in TI stage
- alpha_X: Regularization parameter in color gradient in FC stage
- tau: Threshold on chroma singla in FC stage
- Outputs:
- K_hor: Output FC filtered image
- K_TI_hor: Output TI filtered image
- X_max: Output local maxima in TI stage
- X_min: Output local minima in TI stage
+ Perform the 1D separable successive TI and FC 1D filtering.
+
+ Parameters
+ ----------
+ X_in
+ Input red or blue image.
+ G_in
+ Input green image.
+ Y_in
+ Input luma image.
+ L
+ Half-size of the 1D slice.
+ rho
+ The three coefficients for prefiltering in TI stage.
+ alpha_X
+ Regularization parameter in color gradient in FC stage.
+ tau
+ Threshold on chroma signal in FC stage.
+ K_hor
+ Output FC filtered image.
+ K_TI_hor
+ Output TI filtered image.
+ X_max
+ Output local maxima in TI stage.
+ X_min
+ Output local minima in TI stage.
"""
+
cdef Py_ssize_t M, N, i, j
cdef int l = 0
cdef int LL = 2 * L + 1
@@ -243,7 +361,6 @@ cdef void ti_and_ca_filtering1D(DTYPE_t[:, ::1] X_in, DTYPE_t[:, ::1] G_in, DTYP
cdef DTYPE_t[::1] X_Wmax = np.empty(M, dtype=DTYPE)
cdef DTYPE_t[::1] X_Wmin = np.empty(M, dtype=DTYPE)
- # for i in range(L, M - L, 1):
for i in prange(L, M - L, 1, nogil=True):
for j in range(L, N - L, 1):
W_K_sum[i] = 0
@@ -328,10 +445,34 @@ cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X
DTYPE_t[:, ::1] X_min, DTYPE_t beta_X, int L_hor, int L_ver, DTYPE_t gamma_1,
DTYPE_t gamma_2, DTYPE_t[:, ::1] K_out):
"""
- Arbitration stage between the TI and FC filtered images.
- Inputs:
- K: Output of FC stage, merge of horizontal and vertical filetered images
-
+ Perform the arbitration stage between the TI and FC filtered images.
+
+ Parameters
+ ----------
+ K
+ Output of FC stage, merge of horizontal and vertical filtered images.
+ K_TI
+ Output of TI stage.
+ X
+ Input red or blue image.
+ G
+ Input green image.
+ X_max
+ Local maxima from TI stage.
+ X_min
+ Local minima from TI stage.
+ beta_X
+ Parameter for arbitration stage.
+ L_hor
+ Half-size of horizontal 1D slice.
+ L_ver
+ Half-size of vertical 1D slice.
+ gamma_1
+ First gamma parameter for arbitration weight calculation.
+ gamma_2
+ Second gamma parameter for arbitration weight calculation.
+ K_out
+ Output arbitrated image.
"""
@@ -355,7 +496,6 @@ cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X
cdef DTYPE_t[::1] X_Wmax_hor = np.empty(M, dtype=DTYPE)
cdef DTYPE_t[::1] X_Wmin_hor = np.empty(M, dtype=DTYPE)
- # for i in range(L, M - L, 1):
for i in prange(L, M - L, 1, nogil=True):
for j in range(L, N - L, 1):
X_Emax_hor[i] = X[i, j]
@@ -401,7 +541,6 @@ cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X
cdef DTYPE_t[:, ::1] Xt = transpose(X)
cdef DTYPE_t[:, ::1] Gt = transpose(G)
- # for i in range(L, N - L, 1):
for i in prange(L, N - L, 1, nogil=True):
for j in range(L, M - L, 1):
X_Emax_ver[i] = Xt[i, j]
@@ -432,7 +571,6 @@ cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X
## Compute X_contrast (Eq. (21))
cdef DTYPE_t[:, ::1] X_contrast = X_contrast_ver
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(0, N, 1):
if X_contrast_hor[i, j] > X_contrast_ver[i, j]:
@@ -440,7 +578,6 @@ cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X
## Compute the arbitration weight (Eq. (22)) and the final filtered image (Eq. (17))
cdef DTYPE_t [::1] alpha_K = np.empty(M, dtype=DTYPE)
- # for i in range(0, M, 1):
for i in prange(0, M, 1, nogil=True):
for j in range(0, N, 1):
alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / fmin(fmax(X_max[i, j] - X_min[i, j], gamma_2), gamma_1), 1.0)
diff --git a/chromatic_aberration_filtering/filter.py b/chromatic_aberration_filtering/filter.py
deleted file mode 100644
index 93cca54..0000000
--- a/chromatic_aberration_filtering/filter.py
+++ /dev/null
@@ -1,363 +0,0 @@
-import numpy as np
-
-def chromatic_removal(I_in, L_hor=7, L_ver=4, rho=(-0.25, 1.375, -0.125), tau=15, gamma_1=128, gamma_2=64, use_yuv=False):
- ## Introduction
- R_in = I_in[..., 0]
- G_in = I_in[..., 1]
- B_in = I_in[..., 2]
- Y_in = 0.299 * R_in + 0.587 * G_in + 0.114 * B_in
-
- ## Filtering
- # Horizontal pass
- K_r_hor, K_rTI_hor, R_max_hor, R_min_hor = ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho=rho, tau=tau, alpha_X=0.5)
- K_b_hor, K_bTI_hor, B_max_hor, B_min_hor = ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho=rho, tau=tau, alpha_X=1.0)
-
- # Vertical pass
- K_r_ver, K_rTI_ver, R_max_ver, R_min_ver = ti_and_ca_filtering1D(R_in.T, G_in.T, Y_in.T, L_ver, rho=rho, tau=tau, alpha_X=0.5)
- K_b_ver, K_bTI_ver, B_max_ver, B_min_ver = ti_and_ca_filtering1D(B_in.T, G_in.T, Y_in.T, L_ver, rho=rho, tau=tau, alpha_X=1.0)
- K_r_ver = K_r_ver.T
- K_b_ver = K_b_ver.T
- K_rTI_ver = K_rTI_ver.T
- K_bTI_ver = K_bTI_ver.T
- R_max_ver = R_max_ver.T
- B_max_ver = B_max_ver.T
- R_min_ver = R_min_ver.T
- B_min_ver = B_min_ver.T
-
- ## Arbitration
- start = time.time()
- # Build the 2D images from the vertically and the horizontally FC filtered images (Eqs. (16))
- # Kb
- K_b = np.array(K_b_ver)
- mask = np.abs(K_b_hor) < np.abs(K_b_ver)
- K_b[mask] = K_b_hor[mask]
- #Kr
- K_r = np.array(K_r_ver)
- mask = np.abs(K_r_hor) < np.abs(K_r_ver)
- K_r[mask] = K_r_hor[mask]
-
- # Build the 2D images from the vertically and the horizontally TI filtered images (Eqs. (18))
- # Kb
- K_bTI = np.array(K_bTI_ver)
- B_max = np.array(B_max_ver)
- B_min = np.array(B_min_ver)
- mask = np.abs(K_bTI_hor) < np.abs(K_bTI_ver)
- K_bTI[mask] = K_bTI_hor[mask]
- B_max[mask] = B_max_hor[mask]
- B_min[mask] = B_min_hor[mask]
-
- # Kr
- K_rTI = np.array(K_rTI_ver)
- R_max = np.array(R_max_ver)
- R_min = np.array(R_min_ver)
- mask = np.abs(K_rTI_hor) < np.abs(K_rTI_ver)
- K_rTI[mask] = K_rTI_hor[mask]
- R_max[mask] = R_max_hor[mask]
- R_min[mask] = R_min_hor[mask]
-
- # Contrast arbitration
- K_rout = arbitration(K_r, K_rTI, R_in, G_in, R_max, R_min, beta_X=1.0, L_hor=L_hor, L_ver=L_ver, gamma_1=gamma_1, gamma_2=gamma_2)
- K_bout = arbitration(K_b, K_bTI, B_in, G_in, B_max, B_min, beta_X=0.25, L_hor=L_hor, L_ver=L_ver, gamma_1=gamma_1, gamma_2=gamma_2)
-
- K_rout = K_rTI
- K_bout = K_bTI
-
- # Final RGB conversion (Eq. (24))
- if use_yuv:
- I_out = np.stack([Y_in + 1.13983 * K_rout,
- Y_in - 0.39465 * K_bout - 0.58060 * K_rout,
- Y_in + 2.03211 * K_bout], axis=-1)
- else:
- I_out = np.stack([K_rout + G_in, G_in, K_bout + G_in], axis=-1)
-
- return I_out
-
-
-def ti_and_ca_filtering1D(X_in, G_in, Y_in, L, rho, alpha_X, tau):
- LL = 2 * L + 1
- X_in_padded = np.pad(X_in, [(0, 0), (L, L)], mode='edge') # (M, N+2*L)
- G_in_padded = np.pad(G_in, [(0, 0), (L, L)], mode='edge') # (M, N+2*L)
- Y_in_padded = np.pad(Y_in, [(0, 0), (L, L)], mode='edge') # (M, N+2*L)
-
- grad_X = np.pad(np.diff(X_in_padded, 1, axis=-1), [(0, 0), (0, 1)], mode='edge') # (M, N+2*L)
- grad_G = np.pad(np.diff(G_in_padded, 1, axis=-1), [(0, 0), (0, 1)], mode='edge') # (M, N+2*L)
-
- K_TI_hor = np.empty_like(X_in)
- K_hor = np.empty_like(X_in)
- X_max = np.empty_like(X_in)
- X_min = np.empty_like(X_in)
- M, N = X_in.shape
-
- from tqdm import tqdm
- # for j in range(N):
- for j in tqdm(range(N)):
- ###### extract windows
- X_in_L = X_in_padded[:, j:j + LL] # (M, 2L+1)
- G_in_L = G_in_padded[:, j:j + LL] # (M, 2L+1)
- Y_in_L = Y_in_padded[:, j:j + LL] # (M, 2L+1)
- grad_X_L = grad_X[:, j:j + LL] # (M, 2L+1)
- grad_G_L = grad_G[:, j:j + LL] # (M, 2L+1)
-
- ###### Transient improvement filtering
- ## Compute min and max on windows (Eqs. (2) and (3))
- X_in_L_max, X_in_L_min = compute_local_max_and_min(X_in_L) # (M,N) arrays # TODO: recursive
-
- ## Main TI process (Eq. (1))
- mask = X_in_L[:, L] > G_in_L[:, L]
- mask_not = np.bitwise_not(mask)
- X_pf = rho[0] * X_in_L_max + rho[1] * X_in_L + rho[2] * X_in_L_min # (M,N), init X_pf
- X_pf[mask_not] = rho[0] * X_in_L_min[mask_not] + rho[1] * X_in_L[mask_not] + rho[2] * X_in_L_max[mask_not] # (M,N), replace
-
- ## Restricting the range of admissible values (Eq. (4))
- X_TImax = np.array(X_in_L) # X_in_L == 0
- X_TImin = np.array(X_in_L)
- X_TImin[mask] = np.maximum(X_in_L_min[mask], G_in_L[mask]) # X_in_L > G_in_L
- X_TImax[mask_not] = np.minimum(X_in_L_max[mask_not], G_in_L[mask_not]) # X_in_L < G_in_L
-
- ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- X_TI = np.clip(X_pf, a_min=X_TImin, a_max=X_TImax) # (M, 2L+1)
- K_TI_hor[:, j] = X_TI[:, L] - G_in_L[:, L] # (M, 1)
-
- X_max[:, j] = np.squeeze(X_in_L_max, 1)
- X_min[:, j] = np.squeeze(X_in_L_min, 1)
-
- # RGB2KbKr conversion (Eq. (7))
- K_TI = X_TI - G_in_L # (M, 2L+1)
-
- ##### False color filtering
- ## Chromaticity sign (Eq. (11))
- S_K = compute_S_K(K_TI, tau) # (M, 2L+1)
- ## Gradients' weights (Eq. (12))
- w_K = compute_w_K(K_TI, grad_X=grad_X_L, grad_G=grad_G_L, Y=Y_in_L, alpha_X=alpha_X) # (M, 2L+1)
- ## Combinations of the weights (Eq. (10))
- W_K = S_K * w_K # (M, 2L+1)
-
- ## Linear filtering with clipping (Eqs. (9) and (10))
- W_K = W_K / np.sum(W_K, axis=-1, keepdims=True) # (M, 2*L+1)
- K_hor[:, j] = np.einsum('ij,ij->i', W_K, clip(K_TI, K_TI[..., L])) # (M, 1)
-
- return K_hor, K_TI_hor, X_max, X_min
-
-
-def transiant_improvement(X_in, G_in, L_hor=7, L_ver=4, rho=(-0.25, 1.375, -0.125)):
- ## Horizontal pass
- X_TI_hor = transiant_improvement1D(X_in, G_in, L_hor, rho)
- ## Vertical pass
- X_TI_ver = transiant_improvement1D(X_in.T, G_in.T, L_ver, rho).T
- ## Full filtering
- X_TI = transiant_improvement1D(X_TI_hor.T, G_in.T, L_ver, rho).T
-
- return X_TI, X_TI_hor, X_TI_ver
-
-
-def transiant_improvement1D(X_in, G_in, L, rho):
- M, N = X_in.shape
- LL = 2*L+1
-
- X_in_padded = np.pad(X_in, [(0,0), (L, L)], mode='edge') # (M, N+2*L)
- G_in_padded = np.pad(G_in, [(0,0), (L, L)], mode='edge') # (M, N+2*L)
-
- X_TI = np.empty_like(X_in)
-
- for j in range(N):
- X_in_L = X_in_padded[:, j:j+LL]
- G_in_L = G_in_padded[:, j:j+LL]
-
- ## Compute min and max on windows (Eqs. (2) and (3))
- X_max, X_min = compute_local_max_and_min(X_in_L) # (M,N) arrays
-
- ## Main TI process (Eq. (1))
- mask = X_in_L[:, L] > G_in_L[:, L]
- mask_not = np.bitwise_not(mask)
- X_pf = rho[0] * X_max + rho[1] * X_in_L + rho[2] * X_min # (M,N), init X_pf
- X_pf[mask_not] = rho[0] * X_min[mask_not] + rho[1] * X_in_L[mask_not] + rho[2] * X_max[mask_not] # (M,N), replace
-
- ## Restricting the range of admissible values (Eq. (4))
- X_TImax = X_TImin = X_in_L # X_in_L == 0
- X_TImin[mask] = np.maximum(X_min[mask], G_in_L[mask]) # X_in_L > G_in_L
- X_TImax[mask_not] = np.minimum(X_max[mask_not], G_in_L[mask_not]) # X_in_L < G_in_L
-
- ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- X_TI[:, j] = np.clip(X_pf, a_min=X_TImin, a_max=X_TImax)
-
- return X_TI
-
-
-def compute_local_max_and_min(X):
- LL = X.shape[-1] # (M, 2L+1)
- L = (LL-1) // 2
-
- ## compute min and max in two directions
- X_Emax = np.max(X[:, -L-1:], axis=-1, keepdims=True) # (N,1)
- X_Emin = np.min(X[:, -L-1:], axis=-1, keepdims=True) # (N,1)
- X_Wmax = np.max(X[:, :L+1], axis=-1, keepdims=True) # (N,1)
- X_Wmin = np.min(X[:, :L+1], axis=-1, keepdims=True) # (N,1)
-
- ## Select the best values
- X_max = X_Wmax
- X_min = X_Emin
- mask = X_Emax - X_Wmin >= X_Wmax - X_Emin
- X_max[mask] = X_Emax[mask]
- X_min[mask] = X_Wmin[mask]
-
- return X_max, X_min
-
-
-def false_color_filtering(K, X, G, Y, alpha_X, L_hor=7, L_ver=4, tau=15./255):
- K_hor = false_color_filtering1D(K, X, G, Y, L_hor, tau, alpha_X)
- K_ver = false_color_filtering1D(K.T, X.T, G.T, Y.T, L_ver, tau, alpha_X).T
-
- return K_hor, K_ver
-
-
-def false_color_filtering1D(K, X, G, Y, L, tau, alpha_X):
- N, M = K.shape
-
- LL = 2*L+1
-
- K_padded = np.pad(K, [(0, 0), (L, L)], mode='edge') # (M, N+2*L+1)
- X_padded = np.pad(X, [(0, 0), (L, L)], mode='edge') # (M, N+2*L+1)
- G_padded = np.pad(G, [(0, 0), (L, L)], mode='edge') # (M, N+2*L+1)
-
- grad_X = np.pad(np.diff(X_padded, axis=-1), [(0, 0), (0, 1)], mode='edge') # (M, N+2*L+1)
- grad_G = np.pad(np.diff(G_padded, axis=-1), [(0, 0), (0, 1)], mode='edge') # (M, N+2*L+1)
-
- K_hor = np.empty_like(K) # (M,N)
-
- ## Horizontal pass
- for j in range(M):
- K_L = K_padded[:, j:j+LL]
- S_K = compute_S_K(K_L, tau) # (M, N+2*L+1)
- w_K = compute_w_K(K_L, grad_X[:, j:j+LL], grad_G[:, j:j+LL], Y[:, j:j+LL], alpha_X) # (M, N+2*L+1)
- W = S_K * w_K # (M, N+2*L+1)
-
- ## Filtering (Eq. (8))
- K_hor[:, j] = np.sum(W * clip(K_L, K_L[:, L]), axis=-1) / np.sum(W, axis=-1) # (M)
-
- return K_hor
-
-
-def compute_S_K(K, tau):
- LL = K.shape[-1] # (M, 2L+1)
- L = (LL-1) // 2
- K_ref = K[:, L:L+1] # (M, 1)
- ## Compute S_K (Eq. (11))
- S = np.empty_like(K)
- mask = np.bitwise_or(np.sign(K_ref) == np.sign(K), np.abs(K) < tau)
- S[mask] = 1
- return S
-
-
-def compute_w_K(K, grad_X, grad_G, Y, alpha_X):
- LL = K.shape[-1] # (M, 2L+1)
- L = (LL - 1) // 2
- Y_ref = Y[:, L:L + 1] # (M, 1)
- ## Compute w_K (Eqs (12), (13), (14) and (15))
- ## Compute D_G (Eq. (13))
- D_G = np.abs(grad_G)
- ## Compute D_X (Eq. (14))
- D_X = np.maximum(np.abs(grad_X), alpha_X * np.abs(K))
- ## Compute D_Y (Eq. (15))
- D_Y = np.abs(Y_ref - Y)
- ## Compute w_K (Eq. (12))
- return 1.0 / (D_G + D_X + D_Y + 1e-8)
-
-
-def clip(K, K_ref):
- ## Compute clip (Eq. (9))
- mask = K_ref > 0
- K[mask] = np.minimum(K[mask], K_ref[mask][:, None])
- mask = K_ref < 0
- K[mask] = np.maximum(K[mask], K_ref[mask][:, None])
- return K
-
-
-def arbitration(K, K_TI, X, G, X_max, X_min, beta_X, L_hor, L_ver, gamma_1=0.5, gamma_2=0.25):
- M, N = X.shape
-
- L = L_hor
- LL = 2 * L + 1
-
- X_padded = np.pad(X, [(0, 0), (L, L)], mode='edge')
- G_padded = np.pad(G, [(0, 0), (L, L)], mode='edge')
-
- ## Compute the Contrast images (Eq. (20))
- X_contrast_hor = np.empty_like(X) # (M, N), horizontal pass
- for j in range(N):
- X_L = X_padded[:, j:j+LL] # (M, 2*L_hor+1)
- G_L = G_padded[:, j:j+LL] # (N, 2*L_hor+1)
- Xp_max, Xp_min = compute_local_max_and_min_color_constraints(X_L, G_L, beta_X) # (M,1)
- X_contrast_hor[:, j] = np.squeeze(Xp_max - Xp_min, 1)
-
- L = L_ver
- LL = 2 * L + 1
-
- X_padded = np.pad(X.T, [(0, 0), (L, L)], mode='edge')
- G_padded = np.pad(G.T, [(0, 0), (L, L)], mode='edge')
-
- X_contrast_ver = np.empty_like(X.T) # (N, M), vertical pass
- for j in range(M):
- X_L = X_padded[:, j:j+LL] # (N, 2*L_ver+1)
- G_L = G_padded[:, j:j+LL] # (N, 2*L_ver+1)
- Xp_max, Xp_min = compute_local_max_and_min_color_constraints(X_L, G_L, beta_X) # (M,1)
- X_contrast_ver[:, j] = np.squeeze(Xp_max - Xp_min, 1)
- X_contrast_ver = X_contrast_ver.T # (M, N)
-
- ## Compute X_contrast (Eq. (21))
- X_contrast = X_contrast_ver
- mask = X_contrast_hor > X_contrast_ver
- X_contrast[mask] = X_contrast_hor[mask]
-
- ## Compute the arbitration weight (Eq. (22))
- alpha_K = compute_alpha_K(X_contrast, X_max=X_max, X_min=X_min, gamma_1=gamma_1, gamma_2=gamma_2, use_f2=False)
-
- ## Finally compute the final filtered image (Eq. (17))
- K_out = (1 - alpha_K) * K_TI + alpha_K * K
-
- return K_out
-
-
-def compute_local_max_and_min_color_constraints(X, G, beta):
- ## Recompute updated local max and min (Eq .(19))
- LL = X.shape[-1] # (M, 2L+1)
- L = (LL-1) // 2
-
- ## compute min and max in two directions
- X_Emax = np.max(X[:, -L-1:] - beta * np.abs(X[:, -L-1:] - G[:, -L-1:]), axis=-1, keepdims=True) # (M,1)
- X_Emin = np.min(X[:, -L-1:] + beta * np.abs(X[:, -L-1:] - G[:, -L-1:]), axis=-1, keepdims=True) # (M,1)
- X_Wmax = np.max(X[:, :L+1] - beta * np.abs(X[:, :L+1] - G[:, :L+1]), axis=-1, keepdims=True) # (M,1)
- X_Wmin = np.min(X[:, :L+1] + beta * np.abs(X[:, :L+1] - G[:, :L+1]), axis=-1, keepdims=True) # (M,1)
-
- ## Select the best values
- X_max = X_Wmax
- X_min = X_Emin
- mask = X_Emax - X_Wmin >= X_Wmax - X_Emin
- X_max[mask] = X_Emax[mask]
- X_min[mask] = X_Wmin[mask]
-
- return X_max, X_min
-
-
-def compute_alpha_K(X, X_max=None, X_min=None, gamma_1=0.5, gamma_2=0.25, use_f2=False):
- ## Compute alpha_K using f_2 in the paper (Eqs. (22) and (23))
- num = np.maximum(X, 0)
- if use_f2:
- assert((X_max is not None) and (X_min is not None))
- denom = np.minimum(np.maximum(X_max - X_min, gamma_2), gamma_1)
- else:
- denom = gamma_1
- return np.minimum(num / denom, 1.0)
-
-
-def KbKrtoRGB(J):
- R = J[..., 0] + J[..., 2]
- G = J[..., 0]
- B = J[..., 0] + J[..., 1]
- return np.stack([R, G, B], axis=-1)
-
-
-def RGBtoKbKr(I):
- G = I[..., 1]
- Kb = I[..., 2] - G
- Kr = I[..., 0] - G
- return np.stack([G, Kb, Kr], axis=-1)
diff --git a/chromatic_aberration_filtering/filter_cython.c b/chromatic_aberration_filtering/filter_cython.c
deleted file mode 100644
index 5e61287..0000000
--- a/chromatic_aberration_filtering/filter_cython.c
+++ /dev/null
@@ -1,30954 +0,0 @@
-/* Generated by Cython 0.29.21 */
-
-/* BEGIN: Cython Metadata
-{
- "distutils": {
- "depends": [],
- "extra_compile_args": [
- "-fopenmp"
- ],
- "extra_link_args": [
- "-fopenmp"
- ],
- "name": "false_color_filtering.filter_cython",
- "sources": [
- "false_color_filtering/filter_cython.pyx"
- ]
- },
- "module_name": "false_color_filtering.filter_cython"
-}
-END: Cython Metadata */
-
-#define PY_SSIZE_T_CLEAN
-#include "Python.h"
-#ifndef Py_PYTHON_H
- #error Python headers needed to compile C extensions, please install development version of Python.
-#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
- #error Cython requires Python 2.6+ or Python 3.3+.
-#else
-#define CYTHON_ABI "0_29_21"
-#define CYTHON_HEX_VERSION 0x001D15F0
-#define CYTHON_FUTURE_DIVISION 0
-#include
-#ifndef offsetof
- #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
-#endif
-#if !defined(WIN32) && !defined(MS_WINDOWS)
- #ifndef __stdcall
- #define __stdcall
- #endif
- #ifndef __cdecl
- #define __cdecl
- #endif
- #ifndef __fastcall
- #define __fastcall
- #endif
-#endif
-#ifndef DL_IMPORT
- #define DL_IMPORT(t) t
-#endif
-#ifndef DL_EXPORT
- #define DL_EXPORT(t) t
-#endif
-#define __PYX_COMMA ,
-#ifndef HAVE_LONG_LONG
- #if PY_VERSION_HEX >= 0x02070000
- #define HAVE_LONG_LONG
- #endif
-#endif
-#ifndef PY_LONG_LONG
- #define PY_LONG_LONG LONG_LONG
-#endif
-#ifndef Py_HUGE_VAL
- #define Py_HUGE_VAL HUGE_VAL
-#endif
-#ifdef PYPY_VERSION
- #define CYTHON_COMPILING_IN_PYPY 1
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 0
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #if PY_VERSION_HEX < 0x03050000
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #elif !defined(CYTHON_USE_ASYNC_SLOTS)
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #undef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 1
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 0
- #undef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
-#elif defined(PYSTON_VERSION)
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 1
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 0
- #undef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
-#else
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 1
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #if PY_VERSION_HEX < 0x02070000
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
- #define CYTHON_USE_PYTYPE_LOOKUP 1
- #endif
- #if PY_MAJOR_VERSION < 3
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #elif !defined(CYTHON_USE_ASYNC_SLOTS)
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #if PY_VERSION_HEX < 0x02070000
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
- #define CYTHON_USE_PYLONG_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #if PY_VERSION_HEX < 0x030300F0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #elif !defined(CYTHON_USE_UNICODE_WRITER)
- #define CYTHON_USE_UNICODE_WRITER 1
- #endif
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #ifndef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 1
- #endif
- #ifndef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 1
- #endif
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
- #endif
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
- #endif
- #ifndef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
- #endif
- #ifndef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
- #endif
-#endif
-#if !defined(CYTHON_FAST_PYCCALL)
-#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
-#endif
-#if CYTHON_USE_PYLONG_INTERNALS
- #include "longintrepr.h"
- #undef SHIFT
- #undef BASE
- #undef MASK
- #ifdef SIZEOF_VOID_P
- enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
- #endif
-#endif
-#ifndef __has_attribute
- #define __has_attribute(x) 0
-#endif
-#ifndef __has_cpp_attribute
- #define __has_cpp_attribute(x) 0
-#endif
-#ifndef CYTHON_RESTRICT
- #if defined(__GNUC__)
- #define CYTHON_RESTRICT __restrict__
- #elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define CYTHON_RESTRICT __restrict
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_RESTRICT restrict
- #else
- #define CYTHON_RESTRICT
- #endif
-#endif
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_MAYBE_UNUSED_VAR
-# if defined(__cplusplus)
- template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
-# else
-# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-# define CYTHON_NCP_UNUSED
-# else
-# define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
-#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
-#ifdef _MSC_VER
- #ifndef _MSC_STDINT_H_
- #if _MSC_VER < 1300
- typedef unsigned char uint8_t;
- typedef unsigned int uint32_t;
- #else
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int32 uint32_t;
- #endif
- #endif
-#else
- #include
-#endif
-#ifndef CYTHON_FALLTHROUGH
- #if defined(__cplusplus) && __cplusplus >= 201103L
- #if __has_cpp_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH [[fallthrough]]
- #elif __has_cpp_attribute(clang::fallthrough)
- #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
- #elif __has_cpp_attribute(gnu::fallthrough)
- #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
- #endif
- #endif
- #ifndef CYTHON_FALLTHROUGH
- #if __has_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
- #else
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
- #if defined(__clang__ ) && defined(__apple_build_version__)
- #if __apple_build_version__ < 7000000
- #undef CYTHON_FALLTHROUGH
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
-#endif
-
-#ifndef CYTHON_INLINE
- #if defined(__clang__)
- #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
- #elif defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
-#endif
-
-#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
- #define Py_OptimizeFlag 0
-#endif
-#define __PYX_BUILD_PY_SSIZE_T "n"
-#define CYTHON_FORMAT_SSIZE_T "z"
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #define __Pyx_DefaultClassType PyClass_Type
-#else
- #define __Pyx_BUILTIN_MODULE_NAME "builtins"
-#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-#else
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-#endif
- #define __Pyx_DefaultClassType PyType_Type
-#endif
-#ifndef Py_TPFLAGS_CHECKTYPES
- #define Py_TPFLAGS_CHECKTYPES 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_INDEX
- #define Py_TPFLAGS_HAVE_INDEX 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
- #define Py_TPFLAGS_HAVE_NEWBUFFER 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_FINALIZE
- #define Py_TPFLAGS_HAVE_FINALIZE 0
-#endif
-#ifndef METH_STACKLESS
- #define METH_STACKLESS 0
-#endif
-#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
- #ifndef METH_FASTCALL
- #define METH_FASTCALL 0x80
- #endif
- typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
- typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
- Py_ssize_t nargs, PyObject *kwnames);
-#else
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
- #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
-#endif
-#if CYTHON_FAST_PYCCALL
-#define __Pyx_PyFastCFunction_Check(func)\
- ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
-#else
-#define __Pyx_PyFastCFunction_Check(func) 0
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
- #define PyObject_Malloc(s) PyMem_Malloc(s)
- #define PyObject_Free(p) PyMem_Free(p)
- #define PyObject_Realloc(p) PyMem_Realloc(p)
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
- #define PyMem_RawMalloc(n) PyMem_Malloc(n)
- #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
- #define PyMem_RawFree(p) PyMem_Free(p)
-#endif
-#if CYTHON_COMPILING_IN_PYSTON
- #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
-#else
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
-#endif
-#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
- #define __Pyx_PyThreadState_Current PyThreadState_GET()
-#elif PY_VERSION_HEX >= 0x03060000
- #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
-#elif PY_VERSION_HEX >= 0x03000000
- #define __Pyx_PyThreadState_Current PyThreadState_GET()
-#else
- #define __Pyx_PyThreadState_Current _PyThreadState_Current
-#endif
-#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
-#include "pythread.h"
-#define Py_tss_NEEDS_INIT 0
-typedef int Py_tss_t;
-static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
- *key = PyThread_create_key();
- return 0;
-}
-static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
- Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
- *key = Py_tss_NEEDS_INIT;
- return key;
-}
-static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
- PyObject_Free(key);
-}
-static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
- return *key != Py_tss_NEEDS_INIT;
-}
-static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
- PyThread_delete_key(*key);
- *key = Py_tss_NEEDS_INIT;
-}
-static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
- return PyThread_set_key_value(*key, value);
-}
-static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
- return PyThread_get_key_value(*key);
-}
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
-#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
-#else
-#define __Pyx_PyDict_NewPresized(n) PyDict_New()
-#endif
-#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
-#else
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
-#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
-#else
-#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
-#endif
-#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
- #define CYTHON_PEP393_ENABLED 1
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
- 0 : _PyUnicode_Ready((PyObject *)(op)))
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
- #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
- #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
- #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
- #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
- #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
- #endif
-#else
- #define CYTHON_PEP393_ENABLED 0
- #define PyUnicode_1BYTE_KIND 1
- #define PyUnicode_2BYTE_KIND 2
- #define PyUnicode_4BYTE_KIND 4
- #define __Pyx_PyUnicode_READY(op) (0)
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
- #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
- #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
- #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
-#endif
-#if CYTHON_COMPILING_IN_PYPY
- #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
-#else
- #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
- PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
- #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
- #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
- #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
-#endif
-#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
-#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
-#else
- #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
-#endif
-#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
- #define PyObject_ASCII(o) PyObject_Repr(o)
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBaseString_Type PyUnicode_Type
- #define PyStringObject PyUnicodeObject
- #define PyString_Type PyUnicode_Type
- #define PyString_Check PyUnicode_Check
- #define PyString_CheckExact PyUnicode_CheckExact
-#ifndef PyObject_Unicode
- #define PyObject_Unicode PyObject_Str
-#endif
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
- #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
-#else
- #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
- #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
-#endif
-#ifndef PySet_CheckExact
- #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
-#endif
-#if PY_VERSION_HEX >= 0x030900A4
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
-#else
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
-#endif
-#if CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
-#else
- #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyIntObject PyLongObject
- #define PyInt_Type PyLong_Type
- #define PyInt_Check(op) PyLong_Check(op)
- #define PyInt_CheckExact(op) PyLong_CheckExact(op)
- #define PyInt_FromString PyLong_FromString
- #define PyInt_FromUnicode PyLong_FromUnicode
- #define PyInt_FromLong PyLong_FromLong
- #define PyInt_FromSize_t PyLong_FromSize_t
- #define PyInt_FromSsize_t PyLong_FromSsize_t
- #define PyInt_AsLong PyLong_AsLong
- #define PyInt_AS_LONG PyLong_AS_LONG
- #define PyInt_AsSsize_t PyLong_AsSsize_t
- #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
- #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
- #define PyNumber_Int PyNumber_Long
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBoolObject PyLongObject
-#endif
-#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
- #ifndef PyUnicode_InternFromString
- #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
- #endif
-#endif
-#if PY_VERSION_HEX < 0x030200A4
- typedef long Py_hash_t;
- #define __Pyx_PyInt_FromHash_t PyInt_FromLong
- #define __Pyx_PyInt_AsHash_t PyInt_AsLong
-#else
- #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
-#else
- #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
-#endif
-#if CYTHON_USE_ASYNC_SLOTS
- #if PY_VERSION_HEX >= 0x030500B1
- #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
- #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
- #else
- #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
- #endif
-#else
- #define __Pyx_PyType_AsAsync(obj) NULL
-#endif
-#ifndef __Pyx_PyAsyncMethodsStruct
- typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
- } __Pyx_PyAsyncMethodsStruct;
-#endif
-
-#if defined(WIN32) || defined(MS_WINDOWS)
- #define _USE_MATH_DEFINES
-#endif
-#include
-#ifdef NAN
-#define __PYX_NAN() ((float) NAN)
-#else
-static CYTHON_INLINE float __PYX_NAN() {
- float value;
- memset(&value, 0xFF, sizeof(value));
- return value;
-}
-#endif
-#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
-#define __Pyx_truncl trunc
-#else
-#define __Pyx_truncl truncl
-#endif
-
-#define __PYX_MARK_ERR_POS(f_index, lineno) \
- { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
-#define __PYX_ERR(f_index, lineno, Ln_error) \
- { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
-
-#ifndef __PYX_EXTERN_C
- #ifdef __cplusplus
- #define __PYX_EXTERN_C extern "C"
- #else
- #define __PYX_EXTERN_C extern
- #endif
-#endif
-
-#define __PYX_HAVE__false_color_filtering__filter_cython
-#define __PYX_HAVE_API__false_color_filtering__filter_cython
-/* Early includes */
-#include
-#include
-#include "numpy/arrayobject.h"
-#include "numpy/ufuncobject.h"
-#include
-#include "pythread.h"
-#include
-#include "pystate.h"
-#ifdef _OPENMP
-#include
-#endif /* _OPENMP */
-
-#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
-#define CYTHON_WITHOUT_ASSERTIONS
-#endif
-
-typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
- const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
-
-#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
-#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
-#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
-#define __PYX_DEFAULT_STRING_ENCODING ""
-#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
-#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#define __Pyx_uchar_cast(c) ((unsigned char)c)
-#define __Pyx_long_cast(x) ((long)x)
-#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
- (sizeof(type) < sizeof(Py_ssize_t)) ||\
- (sizeof(type) > sizeof(Py_ssize_t) &&\
- likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX) &&\
- (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
- v == (type)PY_SSIZE_T_MIN))) ||\
- (sizeof(type) == sizeof(Py_ssize_t) &&\
- (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX))) )
-static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
- return (size_t) i < (size_t) limit;
-}
-#if defined (__cplusplus) && __cplusplus >= 201103L
- #include
- #define __Pyx_sst_abs(value) std::abs(value)
-#elif SIZEOF_INT >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) abs(value)
-#elif SIZEOF_LONG >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) labs(value)
-#elif defined (_MSC_VER)
- #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
-#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define __Pyx_sst_abs(value) llabs(value)
-#elif defined (__GNUC__)
- #define __Pyx_sst_abs(value) __builtin_llabs(value)
-#else
- #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
-#endif
-static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
-static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
-#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
-#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
-#define __Pyx_PyBytes_FromString PyBytes_FromString
-#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
-static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#else
- #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
-#endif
-#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
-#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
-#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
-#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
-#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
- const Py_UNICODE *u_end = u;
- while (*u_end++) ;
- return (size_t)(u_end - u - 1);
-}
-#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
-#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
-#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
-#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
-#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
-static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
-static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
-static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
-#define __Pyx_PySequence_Tuple(obj)\
- (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
-static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-#if CYTHON_ASSUME_SAFE_MACROS
-#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
-#else
-#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
-#endif
-#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
-#else
-#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
-#endif
-#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
-#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
-static int __Pyx_sys_getdefaultencoding_not_ascii;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- PyObject* ascii_chars_u = NULL;
- PyObject* ascii_chars_b = NULL;
- const char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- if (strcmp(default_encoding_c, "ascii") == 0) {
- __Pyx_sys_getdefaultencoding_not_ascii = 0;
- } else {
- char ascii_chars[128];
- int c;
- for (c = 0; c < 128; c++) {
- ascii_chars[c] = c;
- }
- __Pyx_sys_getdefaultencoding_not_ascii = 1;
- ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
- if (!ascii_chars_u) goto bad;
- ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
- if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
- PyErr_Format(
- PyExc_ValueError,
- "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
- default_encoding_c);
- goto bad;
- }
- Py_DECREF(ascii_chars_u);
- Py_DECREF(ascii_chars_b);
- }
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- Py_XDECREF(ascii_chars_u);
- Py_XDECREF(ascii_chars_b);
- return -1;
-}
-#endif
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
-#else
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
-static char* __PYX_DEFAULT_STRING_ENCODING;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
- if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
- strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- return -1;
-}
-#endif
-#endif
-
-
-/* Test for GCC > 2.95 */
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
-#else /* !__GNUC__ or GCC < 2.95 */
- #define likely(x) (x)
- #define unlikely(x) (x)
-#endif /* __GNUC__ */
-static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
-
-static PyObject *__pyx_m = NULL;
-static PyObject *__pyx_d;
-static PyObject *__pyx_b;
-static PyObject *__pyx_cython_runtime = NULL;
-static PyObject *__pyx_empty_tuple;
-static PyObject *__pyx_empty_bytes;
-static PyObject *__pyx_empty_unicode;
-static int __pyx_lineno;
-static int __pyx_clineno = 0;
-static const char * __pyx_cfilenm= __FILE__;
-static const char *__pyx_filename;
-
-/* Header.proto */
-#if !defined(CYTHON_CCOMPLEX)
- #if defined(__cplusplus)
- #define CYTHON_CCOMPLEX 1
- #elif defined(_Complex_I)
- #define CYTHON_CCOMPLEX 1
- #else
- #define CYTHON_CCOMPLEX 0
- #endif
-#endif
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- #include
- #else
- #include
- #endif
-#endif
-#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
- #undef _Complex_I
- #define _Complex_I 1.0fj
-#endif
-
-
-static const char *__pyx_f[] = {
- "false_color_filtering/filter_cython.pyx",
- "__init__.pxd",
- "stringsource",
- "type.pxd",
-};
-/* NoFastGil.proto */
-#define __Pyx_PyGILState_Ensure PyGILState_Ensure
-#define __Pyx_PyGILState_Release PyGILState_Release
-#define __Pyx_FastGIL_Remember()
-#define __Pyx_FastGIL_Forget()
-#define __Pyx_FastGilFuncInit()
-
-/* MemviewSliceStruct.proto */
-struct __pyx_memoryview_obj;
-typedef struct {
- struct __pyx_memoryview_obj *memview;
- char *data;
- Py_ssize_t shape[8];
- Py_ssize_t strides[8];
- Py_ssize_t suboffsets[8];
-} __Pyx_memviewslice;
-#define __Pyx_MemoryView_Len(m) (m.shape[0])
-
-/* Atomics.proto */
-#include
-#ifndef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 1
-#endif
-#define __pyx_atomic_int_type int
-#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
- (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
- !defined(__i386__)
- #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
- #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Using GNU atomics"
- #endif
-#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
- #include
- #undef __pyx_atomic_int_type
- #define __pyx_atomic_int_type LONG
- #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
- #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
- #ifdef __PYX_DEBUG_ATOMICS
- #pragma message ("Using MSVC atomics")
- #endif
-#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
- #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
- #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Using Intel atomics"
- #endif
-#else
- #undef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 0
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Not using atomics"
- #endif
-#endif
-typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
-#if CYTHON_ATOMICS
- #define __pyx_add_acquisition_count(memview)\
- __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
- #define __pyx_sub_acquisition_count(memview)\
- __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
-#else
- #define __pyx_add_acquisition_count(memview)\
- __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
- #define __pyx_sub_acquisition_count(memview)\
- __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
-#endif
-
-/* BufferFormatStructs.proto */
-#define IS_UNSIGNED(type) (((type) -1) > 0)
-struct __Pyx_StructField_;
-#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
-typedef struct {
- const char* name;
- struct __Pyx_StructField_* fields;
- size_t size;
- size_t arraysize[8];
- int ndim;
- char typegroup;
- char is_unsigned;
- int flags;
-} __Pyx_TypeInfo;
-typedef struct __Pyx_StructField_ {
- __Pyx_TypeInfo* type;
- const char* name;
- size_t offset;
-} __Pyx_StructField;
-typedef struct {
- __Pyx_StructField* field;
- size_t parent_offset;
-} __Pyx_BufFmt_StackElem;
-typedef struct {
- __Pyx_StructField root;
- __Pyx_BufFmt_StackElem* head;
- size_t fmt_offset;
- size_t new_count, enc_count;
- size_t struct_alignment;
- int is_complex;
- char enc_type;
- char new_packmode;
- char enc_packmode;
- char is_valid_array;
-} __Pyx_BufFmt_Context;
-
-/* ForceInitThreads.proto */
-#ifndef __PYX_FORCE_INIT_THREADS
- #define __PYX_FORCE_INIT_THREADS 0
-#endif
-
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775
- * # in Cython to enable them only on the right systems.
- *
- * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t
- */
-typedef npy_int8 __pyx_t_5numpy_int8_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
- *
- * ctypedef npy_int8 int8_t
- * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
- * ctypedef npy_int32 int32_t
- * ctypedef npy_int64 int64_t
- */
-typedef npy_int16 __pyx_t_5numpy_int16_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
- * ctypedef npy_int8 int8_t
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
- * ctypedef npy_int64 int64_t
- * #ctypedef npy_int96 int96_t
- */
-typedef npy_int32 __pyx_t_5numpy_int32_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t
- * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_int96 int96_t
- * #ctypedef npy_int128 int128_t
- */
-typedef npy_int64 __pyx_t_5numpy_int64_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782
- * #ctypedef npy_int128 int128_t
- *
- * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t
- */
-typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
- *
- * ctypedef npy_uint8 uint8_t
- * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint32 uint32_t
- * ctypedef npy_uint64 uint64_t
- */
-typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
- * ctypedef npy_uint8 uint8_t
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint64 uint64_t
- * #ctypedef npy_uint96 uint96_t
- */
-typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t
- * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_uint96 uint96_t
- * #ctypedef npy_uint128 uint128_t
- */
-typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":789
- * #ctypedef npy_uint128 uint128_t
- *
- * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
- * ctypedef npy_float64 float64_t
- * #ctypedef npy_float80 float80_t
- */
-typedef npy_float32 __pyx_t_5numpy_float32_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
- *
- * ctypedef npy_float32 float32_t
- * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_float80 float80_t
- * #ctypedef npy_float128 float128_t
- */
-typedef npy_float64 __pyx_t_5numpy_float64_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":799
- * # The int types are mapped a bit surprising --
- * # numpy.int corresponds to 'l' and numpy.long to 'q'
- * ctypedef npy_long int_t # <<<<<<<<<<<<<<
- * ctypedef npy_longlong long_t
- * ctypedef npy_longlong longlong_t
- */
-typedef npy_long __pyx_t_5numpy_int_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
- * # numpy.int corresponds to 'l' and numpy.long to 'q'
- * ctypedef npy_long int_t
- * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
- * ctypedef npy_longlong longlong_t
- *
- */
-typedef npy_longlong __pyx_t_5numpy_long_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
- * ctypedef npy_long int_t
- * ctypedef npy_longlong long_t
- * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_ulong uint_t
- */
-typedef npy_longlong __pyx_t_5numpy_longlong_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":803
- * ctypedef npy_longlong longlong_t
- *
- * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
- * ctypedef npy_ulonglong ulong_t
- * ctypedef npy_ulonglong ulonglong_t
- */
-typedef npy_ulong __pyx_t_5numpy_uint_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
- *
- * ctypedef npy_ulong uint_t
- * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
- * ctypedef npy_ulonglong ulonglong_t
- *
- */
-typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
- * ctypedef npy_ulong uint_t
- * ctypedef npy_ulonglong ulong_t
- * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_intp intp_t
- */
-typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":807
- * ctypedef npy_ulonglong ulonglong_t
- *
- * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
- * ctypedef npy_uintp uintp_t
- *
- */
-typedef npy_intp __pyx_t_5numpy_intp_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
- *
- * ctypedef npy_intp intp_t
- * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_double float_t
- */
-typedef npy_uintp __pyx_t_5numpy_uintp_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810
- * ctypedef npy_uintp uintp_t
- *
- * ctypedef npy_double float_t # <<<<<<<<<<<<<<
- * ctypedef npy_double double_t
- * ctypedef npy_longdouble longdouble_t
- */
-typedef npy_double __pyx_t_5numpy_float_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
- *
- * ctypedef npy_double float_t
- * ctypedef npy_double double_t # <<<<<<<<<<<<<<
- * ctypedef npy_longdouble longdouble_t
- *
- */
-typedef npy_double __pyx_t_5numpy_double_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
- * ctypedef npy_double float_t
- * ctypedef npy_double double_t
- * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_cfloat cfloat_t
- */
-typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
-
-/* "false_color_filtering/filter_cython.pyx":23
- * # every type in the numpy module there's a corresponding compile-time
- * # type with a _t-suffix.
- * ctypedef np.float32_t DTYPE_t # <<<<<<<<<<<<<<
- * ctypedef np.uint8_t uint8
- *
- */
-typedef __pyx_t_5numpy_float32_t __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t;
-
-/* "false_color_filtering/filter_cython.pyx":24
- * # type with a _t-suffix.
- * ctypedef np.float32_t DTYPE_t
- * ctypedef np.uint8_t uint8 # <<<<<<<<<<<<<<
- *
- *
- */
-typedef __pyx_t_5numpy_uint8_t __pyx_t_21false_color_filtering_13filter_cython_uint8;
-/* Declarations.proto */
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- typedef ::std::complex< float > __pyx_t_float_complex;
- #else
- typedef float _Complex __pyx_t_float_complex;
- #endif
-#else
- typedef struct { float real, imag; } __pyx_t_float_complex;
-#endif
-static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
-
-/* Declarations.proto */
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- typedef ::std::complex< double > __pyx_t_double_complex;
- #else
- typedef double _Complex __pyx_t_double_complex;
- #endif
-#else
- typedef struct { double real, imag; } __pyx_t_double_complex;
-#endif
-static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
-
-
-/*--- Type declarations ---*/
-struct __pyx_array_obj;
-struct __pyx_MemviewEnum_obj;
-struct __pyx_memoryview_obj;
-struct __pyx_memoryviewslice_obj;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814
- * ctypedef npy_longdouble longdouble_t
- *
- * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
- * ctypedef npy_cdouble cdouble_t
- * ctypedef npy_clongdouble clongdouble_t
- */
-typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
- *
- * ctypedef npy_cfloat cfloat_t
- * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
- * ctypedef npy_clongdouble clongdouble_t
- *
- */
-typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
- * ctypedef npy_cfloat cfloat_t
- * ctypedef npy_cdouble cdouble_t
- * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_cdouble complex_t
- */
-typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":818
- * ctypedef npy_clongdouble clongdouble_t
- *
- * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew1(a):
- */
-typedef npy_cdouble __pyx_t_5numpy_complex_t;
-
-/* "View.MemoryView":105
- *
- * @cname("__pyx_array")
- * cdef class array: # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-struct __pyx_array_obj {
- PyObject_HEAD
- struct __pyx_vtabstruct_array *__pyx_vtab;
- char *data;
- Py_ssize_t len;
- char *format;
- int ndim;
- Py_ssize_t *_shape;
- Py_ssize_t *_strides;
- Py_ssize_t itemsize;
- PyObject *mode;
- PyObject *_format;
- void (*callback_free_data)(void *);
- int free_data;
- int dtype_is_object;
-};
-
-
-/* "View.MemoryView":279
- *
- * @cname('__pyx_MemviewEnum')
- * cdef class Enum(object): # <<<<<<<<<<<<<<
- * cdef object name
- * def __init__(self, name):
- */
-struct __pyx_MemviewEnum_obj {
- PyObject_HEAD
- PyObject *name;
-};
-
-
-/* "View.MemoryView":330
- *
- * @cname('__pyx_memoryview')
- * cdef class memoryview(object): # <<<<<<<<<<<<<<
- *
- * cdef object obj
- */
-struct __pyx_memoryview_obj {
- PyObject_HEAD
- struct __pyx_vtabstruct_memoryview *__pyx_vtab;
- PyObject *obj;
- PyObject *_size;
- PyObject *_array_interface;
- PyThread_type_lock lock;
- __pyx_atomic_int acquisition_count[2];
- __pyx_atomic_int *acquisition_count_aligned_p;
- Py_buffer view;
- int flags;
- int dtype_is_object;
- __Pyx_TypeInfo *typeinfo;
-};
-
-
-/* "View.MemoryView":965
- *
- * @cname('__pyx_memoryviewslice')
- * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
- * "Internal class for passing memoryview slices to Python"
- *
- */
-struct __pyx_memoryviewslice_obj {
- struct __pyx_memoryview_obj __pyx_base;
- __Pyx_memviewslice from_slice;
- PyObject *from_object;
- PyObject *(*to_object_func)(char *);
- int (*to_dtype_func)(char *, PyObject *);
-};
-
-
-
-/* "View.MemoryView":105
- *
- * @cname("__pyx_array")
- * cdef class array: # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-
-struct __pyx_vtabstruct_array {
- PyObject *(*get_memview)(struct __pyx_array_obj *);
-};
-static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
-
-
-/* "View.MemoryView":330
- *
- * @cname('__pyx_memoryview')
- * cdef class memoryview(object): # <<<<<<<<<<<<<<
- *
- * cdef object obj
- */
-
-struct __pyx_vtabstruct_memoryview {
- char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
- PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
- PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
- PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
-};
-static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
-
-
-/* "View.MemoryView":965
- *
- * @cname('__pyx_memoryviewslice')
- * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
- * "Internal class for passing memoryview slices to Python"
- *
- */
-
-struct __pyx_vtabstruct__memoryviewslice {
- struct __pyx_vtabstruct_memoryview __pyx_base;
-};
-static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
-
-/* --- Runtime support code (head) --- */
-/* Refnanny.proto */
-#ifndef CYTHON_REFNANNY
- #define CYTHON_REFNANNY 0
-#endif
-#if CYTHON_REFNANNY
- typedef struct {
- void (*INCREF)(void*, PyObject*, int);
- void (*DECREF)(void*, PyObject*, int);
- void (*GOTREF)(void*, PyObject*, int);
- void (*GIVEREF)(void*, PyObject*, int);
- void* (*SetupContext)(const char*, int, const char*);
- void (*FinishContext)(void**);
- } __Pyx_RefNannyAPIStruct;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
- #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
-#ifdef WITH_THREAD
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- if (acquire_gil) {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- PyGILState_Release(__pyx_gilstate_save);\
- } else {\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- }
-#else
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
-#endif
- #define __Pyx_RefNannyFinishContext()\
- __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
- #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
- #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
- #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
- #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
-#else
- #define __Pyx_RefNannyDeclarations
- #define __Pyx_RefNannySetupContext(name, acquire_gil)
- #define __Pyx_RefNannyFinishContext()
- #define __Pyx_INCREF(r) Py_INCREF(r)
- #define __Pyx_DECREF(r) Py_DECREF(r)
- #define __Pyx_GOTREF(r)
- #define __Pyx_GIVEREF(r)
- #define __Pyx_XINCREF(r) Py_XINCREF(r)
- #define __Pyx_XDECREF(r) Py_XDECREF(r)
- #define __Pyx_XGOTREF(r)
- #define __Pyx_XGIVEREF(r)
-#endif
-#define __Pyx_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_XDECREF(tmp);\
- } while (0)
-#define __Pyx_DECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_DECREF(tmp);\
- } while (0)
-#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
-#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
-
-/* PyObjectGetAttrStr.proto */
-#if CYTHON_USE_TYPE_SLOTS
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
-#endif
-
-/* GetBuiltinName.proto */
-static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-
-/* PyDictVersioning.proto */
-#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
-#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
-#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
- (version_var) = __PYX_GET_DICT_VERSION(dict);\
- (cache_var) = (value);
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
- (VAR) = __pyx_dict_cached_value;\
- } else {\
- (VAR) = __pyx_dict_cached_value = (LOOKUP);\
- __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
- }\
-}
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
-static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
-#else
-#define __PYX_GET_DICT_VERSION(dict) (0)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
-#endif
-
-/* GetModuleGlobalName.proto */
-#if CYTHON_USE_DICT_VERSIONS
-#define __Pyx_GetModuleGlobalName(var, name) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
- (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
- __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-}
-#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
- PY_UINT64_T __pyx_dict_version;\
- PyObject *__pyx_dict_cached_value;\
- (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-}
-static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
-#else
-#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
-#endif
-
-/* PyObjectCall.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
-#else
-#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
-#endif
-
-/* MemviewSliceInit.proto */
-#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
-#define __Pyx_MEMVIEW_DIRECT 1
-#define __Pyx_MEMVIEW_PTR 2
-#define __Pyx_MEMVIEW_FULL 4
-#define __Pyx_MEMVIEW_CONTIG 8
-#define __Pyx_MEMVIEW_STRIDED 16
-#define __Pyx_MEMVIEW_FOLLOW 32
-#define __Pyx_IS_C_CONTIG 1
-#define __Pyx_IS_F_CONTIG 2
-static int __Pyx_init_memviewslice(
- struct __pyx_memoryview_obj *memview,
- int ndim,
- __Pyx_memviewslice *memviewslice,
- int memview_is_new_reference);
-static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
- __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
-static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
- __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
-#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
-#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
-#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
-#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
-static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
-static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
-
-/* RaiseArgTupleInvalid.proto */
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
- Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
-
-/* RaiseDoubleKeywords.proto */
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
-
-/* ParseKeywords.proto */
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
- const char* function_name);
-
-/* ArgTypeTest.proto */
-#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
- ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
- __Pyx__ArgTypeTest(obj, type, name, exact))
-static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
-
-/* IsLittleEndian.proto */
-static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
-
-/* BufferFormatCheck.proto */
-static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
-static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
- __Pyx_BufFmt_StackElem* stack,
- __Pyx_TypeInfo* type);
-
-/* BufferGetAndValidate.proto */
-#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
- ((obj == Py_None || obj == NULL) ?\
- (__Pyx_ZeroBuffer(buf), 0) :\
- __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
-static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
- __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
-static void __Pyx_ZeroBuffer(Py_buffer* buf);
-static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
-static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
-static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
-
-#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
-/* PyCFunctionFastCall.proto */
-#if CYTHON_FAST_PYCCALL
-static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
-#else
-#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
-#endif
-
-/* PyFunctionFastCall.proto */
-#if CYTHON_FAST_PYCALL
-#define __Pyx_PyFunction_FastCall(func, args, nargs)\
- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
-#if 1 || PY_VERSION_HEX < 0x030600B1
-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
-#else
-#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
-#endif
-#define __Pyx_BUILD_ASSERT_EXPR(cond)\
- (sizeof(char [1 - 2*!(cond)]) - 1)
-#ifndef Py_MEMBER_SIZE
-#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
-#endif
- static size_t __pyx_pyframe_localsplus_offset = 0;
- #include "frameobject.h"
- #define __Pxy_PyFrame_Initialize_Offsets()\
- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
- #define __Pyx_PyFrame_GetLocalsplus(frame)\
- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
-#endif
-
-/* PyObjectCall2Args.proto */
-static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
-
-/* PyObjectCallMethO.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
-#endif
-
-/* PyObjectCallOneArg.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
-
-/* PyThreadStateGet.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
-#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
-#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
-#else
-#define __Pyx_PyThreadState_declare
-#define __Pyx_PyThreadState_assign
-#define __Pyx_PyErr_Occurred() PyErr_Occurred()
-#endif
-
-/* PyErrFetchRestore.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
-#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
-#else
-#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
-#endif
-#else
-#define __Pyx_PyErr_Clear() PyErr_Clear()
-#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
-#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
-#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
-#endif
-
-/* WriteUnraisableException.proto */
-static void __Pyx_WriteUnraisable(const char *name, int clineno,
- int lineno, const char *filename,
- int full_traceback, int nogil);
-
-/* RaiseException.proto */
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
-
-/* DictGetItem.proto */
-#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
-static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
-#define __Pyx_PyObject_Dict_GetItem(obj, name)\
- (likely(PyDict_CheckExact(obj)) ?\
- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
-#else
-#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
-#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
-#endif
-
-/* RaiseTooManyValuesToUnpack.proto */
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-
-/* RaiseNeedMoreValuesToUnpack.proto */
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-/* RaiseNoneIterError.proto */
-static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
-
-/* ExtTypeTest.proto */
-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
-
-/* GetTopmostException.proto */
-#if CYTHON_USE_EXC_INFO_STACK
-static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
-#endif
-
-/* SaveResetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-#else
-#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
-#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
-#endif
-
-/* PyErrExceptionMatches.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
-static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
-#else
-#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
-#endif
-
-/* GetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
-/* IncludeStringH.proto */
-#include
-
-/* BytesEquals.proto */
-static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* UnicodeEquals.proto */
-static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* StrEquals.proto */
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
-#else
-#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
-#endif
-
-/* None.proto */
-static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
-
-/* UnaryNegOverflows.proto */
-#define UNARY_NEG_WOULD_OVERFLOW(x)\
- (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
-
-static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
-/* GetAttr.proto */
-static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
-
-/* GetItemInt.proto */
-#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
- (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
- __Pyx_GetItemInt_Generic(o, to_py_func(i))))
-#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
- (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck);
-#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
- (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck);
-static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
- int is_list, int wraparound, int boundscheck);
-
-/* ObjectGetItem.proto */
-#if CYTHON_USE_TYPE_SLOTS
-static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
-#else
-#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
-#endif
-
-/* decode_c_string_utf16.proto */
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = 0;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = -1;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = 1;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-
-/* decode_c_string.proto */
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
- const char* cstring, Py_ssize_t start, Py_ssize_t stop,
- const char* encoding, const char* errors,
- PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
-
-/* GetAttr3.proto */
-static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
-
-/* SwapException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
-/* Import.proto */
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-
-/* FastTypeChecks.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
-static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
-#else
-#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
-#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
-#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
-#endif
-#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
-
-static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-/* ListCompAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
-static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len)) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- __Pyx_SET_SIZE(list, len + 1);
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
-#endif
-
-/* PyIntBinop.proto */
-#if !CYTHON_COMPILING_IN_PYPY
-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
-#else
-#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
- (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
-#endif
-
-/* ListExtend.proto */
-static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject* none = _PyList_Extend((PyListObject*)L, v);
- if (unlikely(!none))
- return -1;
- Py_DECREF(none);
- return 0;
-#else
- return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
-#endif
-}
-
-/* ListAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- __Pyx_SET_SIZE(list, len + 1);
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
-#endif
-
-/* None.proto */
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
-
-/* None.proto */
-static CYTHON_INLINE long __Pyx_div_long(long, long);
-
-/* ImportFrom.proto */
-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
-
-/* HasAttr.proto */
-static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
-
-/* PyObject_GenericGetAttrNoDict.proto */
-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
-#endif
-
-/* PyObject_GenericGetAttr.proto */
-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
-#endif
-
-/* SetVTable.proto */
-static int __Pyx_SetVtable(PyObject *dict, void *vtable);
-
-/* PyObjectGetAttrStrNoError.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
-
-/* SetupReduce.proto */
-static int __Pyx_setup_reduce(PyObject* type_obj);
-
-/* TypeImport.proto */
-#ifndef __PYX_HAVE_RT_ImportType_proto
-#define __PYX_HAVE_RT_ImportType_proto
-enum __Pyx_ImportType_CheckSize {
- __Pyx_ImportType_CheckSize_Error = 0,
- __Pyx_ImportType_CheckSize_Warn = 1,
- __Pyx_ImportType_CheckSize_Ignore = 2
-};
-static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
-#endif
-
-/* CLineInTraceback.proto */
-#ifdef CYTHON_CLINE_IN_TRACEBACK
-#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
-#else
-static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
-#endif
-
-/* CodeObjectCache.proto */
-typedef struct {
- PyCodeObject* code_object;
- int code_line;
-} __Pyx_CodeObjectCacheEntry;
-struct __Pyx_CodeObjectCache {
- int count;
- int max_count;
- __Pyx_CodeObjectCacheEntry* entries;
-};
-static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
-static PyCodeObject *__pyx_find_code_object(int code_line);
-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-
-/* AddTraceback.proto */
-static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename);
-
-#if PY_MAJOR_VERSION < 3
- static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
- static void __Pyx_ReleaseBuffer(Py_buffer *view);
-#else
- #define __Pyx_GetBuffer PyObject_GetBuffer
- #define __Pyx_ReleaseBuffer PyBuffer_Release
-#endif
-
-
-/* BufferStructDeclare.proto */
-typedef struct {
- Py_ssize_t shape, strides, suboffsets;
-} __Pyx_Buf_DimInfo;
-typedef struct {
- size_t refcount;
- Py_buffer pybuffer;
-} __Pyx_Buffer;
-typedef struct {
- __Pyx_Buffer *rcbuffer;
- char *data;
- __Pyx_Buf_DimInfo diminfo[8];
-} __Pyx_LocalBuf_ND;
-
-/* MemviewSliceIsContig.proto */
-static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
-
-/* OverlappingSlices.proto */
-static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
- __Pyx_memviewslice *slice2,
- int ndim, size_t itemsize);
-
-/* Capsule.proto */
-static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
-
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(const char *itemp, PyObject *obj);
-
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-
-/* RealImag.proto */
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- #define __Pyx_CREAL(z) ((z).real())
- #define __Pyx_CIMAG(z) ((z).imag())
- #else
- #define __Pyx_CREAL(z) (__real__(z))
- #define __Pyx_CIMAG(z) (__imag__(z))
- #endif
-#else
- #define __Pyx_CREAL(z) ((z).real)
- #define __Pyx_CIMAG(z) ((z).imag)
-#endif
-#if defined(__cplusplus) && CYTHON_CCOMPLEX\
- && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
- #define __Pyx_SET_CREAL(z,x) ((z).real(x))
- #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
-#else
- #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
- #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
-#endif
-
-/* Arithmetic.proto */
-#if CYTHON_CCOMPLEX
- #define __Pyx_c_eq_float(a, b) ((a)==(b))
- #define __Pyx_c_sum_float(a, b) ((a)+(b))
- #define __Pyx_c_diff_float(a, b) ((a)-(b))
- #define __Pyx_c_prod_float(a, b) ((a)*(b))
- #define __Pyx_c_quot_float(a, b) ((a)/(b))
- #define __Pyx_c_neg_float(a) (-(a))
- #ifdef __cplusplus
- #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
- #define __Pyx_c_conj_float(z) (::std::conj(z))
- #if 1
- #define __Pyx_c_abs_float(z) (::std::abs(z))
- #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
- #endif
- #else
- #define __Pyx_c_is_zero_float(z) ((z)==0)
- #define __Pyx_c_conj_float(z) (conjf(z))
- #if 1
- #define __Pyx_c_abs_float(z) (cabsf(z))
- #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
- #endif
- #endif
-#else
- static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
- static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
- #if 1
- static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
- #endif
-#endif
-
-/* Arithmetic.proto */
-#if CYTHON_CCOMPLEX
- #define __Pyx_c_eq_double(a, b) ((a)==(b))
- #define __Pyx_c_sum_double(a, b) ((a)+(b))
- #define __Pyx_c_diff_double(a, b) ((a)-(b))
- #define __Pyx_c_prod_double(a, b) ((a)*(b))
- #define __Pyx_c_quot_double(a, b) ((a)/(b))
- #define __Pyx_c_neg_double(a) (-(a))
- #ifdef __cplusplus
- #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
- #define __Pyx_c_conj_double(z) (::std::conj(z))
- #if 1
- #define __Pyx_c_abs_double(z) (::std::abs(z))
- #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
- #endif
- #else
- #define __Pyx_c_is_zero_double(z) ((z)==0)
- #define __Pyx_c_conj_double(z) (conj(z))
- #if 1
- #define __Pyx_c_abs_double(z) (cabs(z))
- #define __Pyx_c_pow_double(a, b) (cpow(a, b))
- #endif
- #endif
-#else
- static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
- static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
- #if 1
- static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
- #endif
-#endif
-
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
-
-/* MemviewSliceCopyTemplate.proto */
-static __Pyx_memviewslice
-__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
- const char *mode, int ndim,
- size_t sizeof_dtype, int contig_flag,
- int dtype_is_object);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
-
-/* TypeInfoCompare.proto */
-static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
-
-/* MemviewSliceValidateAndInit.proto */
-static int __Pyx_ValidateAndInit_memviewslice(
- int *axes_specs,
- int c_or_f_flag,
- int buf_flags,
- int ndim,
- __Pyx_TypeInfo *dtype,
- __Pyx_BufFmt_StackElem stack[],
- __Pyx_memviewslice *memviewslice,
- PyObject *original_obj);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(PyObject *, int writable_flag);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(PyObject *, int writable_flag);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(PyObject *, int writable_flag);
-
-/* CheckBinaryVersion.proto */
-static int __Pyx_check_binary_version(void);
-
-/* InitStrings.proto */
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
-
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
-static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
-static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
-static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
-static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
-static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
-static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
-
-/* Module declarations from 'cython.view' */
-
-/* Module declarations from 'cython' */
-
-/* Module declarations from 'cpython.buffer' */
-
-/* Module declarations from 'libc.string' */
-
-/* Module declarations from 'libc.stdio' */
-
-/* Module declarations from '__builtin__' */
-
-/* Module declarations from 'cpython.type' */
-static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
-
-/* Module declarations from 'cpython' */
-
-/* Module declarations from 'cpython.object' */
-
-/* Module declarations from 'cpython.ref' */
-
-/* Module declarations from 'cpython.mem' */
-
-/* Module declarations from 'numpy' */
-
-/* Module declarations from 'numpy' */
-static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
-static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
-static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
-static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
-static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
-static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
-static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
-
-/* Module declarations from 'libc.math' */
-
-/* Module declarations from 'false_color_filtering.filter_cython' */
-static PyTypeObject *__pyx_array_type = 0;
-static PyTypeObject *__pyx_MemviewEnum_type = 0;
-static PyTypeObject *__pyx_memoryview_type = 0;
-static PyTypeObject *__pyx_memoryviewslice_type = 0;
-static PyObject *generic = 0;
-static PyObject *strided = 0;
-static PyObject *indirect = 0;
-static PyObject *contiguous = 0;
-static PyObject *indirect_contiguous = 0;
-static int __pyx_memoryview_thread_locks_used;
-static PyThread_type_lock __pyx_memoryview_thread_locks[8];
-static __Pyx_memviewslice __pyx_f_21false_color_filtering_13filter_cython_transpose(__Pyx_memviewslice); /*proto*/
-static void __pyx_f_21false_color_filtering_13filter_cython_grad(__Pyx_memviewslice, Py_ssize_t, Py_ssize_t, __Pyx_memviewslice); /*proto*/
-static int __pyx_f_21false_color_filtering_13filter_cython_sign(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t); /*proto*/
-static __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_f_21false_color_filtering_13filter_cython_clip(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t); /*proto*/
-static void __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __Pyx_memviewslice, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
-static void __pyx_f_21false_color_filtering_13filter_cython_arbitration(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, int, int, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, __Pyx_memviewslice); /*proto*/
-static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
-static void *__pyx_align_pointer(void *, size_t); /*proto*/
-static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
-static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
-static PyObject *_unellipsify(PyObject *, int); /*proto*/
-static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
-static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
-static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
-static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
-static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
-static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
-static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
-static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
-static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
-static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
-static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
-static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
-static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
-static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
-static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
-static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
-static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
-static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
-static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
-static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
-static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
-static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
-static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
-static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
-static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t = { "DTYPE_t", NULL, sizeof(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t), { 0 }, 0, 'R', 0, 0 };
-#define __Pyx_MODULE_NAME "false_color_filtering.filter_cython"
-extern int __pyx_module_is_main_false_color_filtering__filter_cython;
-int __pyx_module_is_main_false_color_filtering__filter_cython = 0;
-
-/* Implementation of 'false_color_filtering.filter_cython' */
-static PyObject *__pyx_builtin_range;
-static PyObject *__pyx_builtin_ValueError;
-static PyObject *__pyx_builtin_RuntimeError;
-static PyObject *__pyx_builtin_ImportError;
-static PyObject *__pyx_builtin_MemoryError;
-static PyObject *__pyx_builtin_enumerate;
-static PyObject *__pyx_builtin_TypeError;
-static PyObject *__pyx_builtin_Ellipsis;
-static PyObject *__pyx_builtin_id;
-static PyObject *__pyx_builtin_IndexError;
-static const char __pyx_k_M[] = "M";
-static const char __pyx_k_N[] = "N";
-static const char __pyx_k_O[] = "O";
-static const char __pyx_k_c[] = "c";
-static const char __pyx_k_i[] = "i";
-static const char __pyx_k_j[] = "j";
-static const char __pyx_k_id[] = "id";
-static const char __pyx_k_np[] = "np";
-static const char __pyx_k_K_b[] = "K_b";
-static const char __pyx_k_K_r[] = "K_r";
-static const char __pyx_k_new[] = "__new__";
-static const char __pyx_k_obj[] = "obj";
-static const char __pyx_k_rho[] = "rho";
-static const char __pyx_k_tau[] = "tau";
-static const char __pyx_k_B_in[] = "B_in";
-static const char __pyx_k_G_in[] = "G_in";
-static const char __pyx_k_I_in[] = "I_in";
-static const char __pyx_k_R_in[] = "R_in";
-static const char __pyx_k_Y_in[] = "Y_in";
-static const char __pyx_k_base[] = "base";
-static const char __pyx_k_clip[] = "clip";
-static const char __pyx_k_dict[] = "__dict__";
-static const char __pyx_k_main[] = "__main__";
-static const char __pyx_k_mode[] = "mode";
-static const char __pyx_k_name[] = "name";
-static const char __pyx_k_ndim[] = "ndim";
-static const char __pyx_k_pack[] = "pack";
-static const char __pyx_k_size[] = "size";
-static const char __pyx_k_step[] = "step";
-static const char __pyx_k_stop[] = "stop";
-static const char __pyx_k_test[] = "__test__";
-static const char __pyx_k_ASCII[] = "ASCII";
-static const char __pyx_k_B_max[] = "B_max";
-static const char __pyx_k_B_min[] = "B_min";
-static const char __pyx_k_DTYPE[] = "DTYPE";
-static const char __pyx_k_I_out[] = "I_out";
-static const char __pyx_k_K_bTI[] = "K_bTI";
-static const char __pyx_k_K_rTI[] = "K_rTI";
-static const char __pyx_k_L_hor[] = "L_hor";
-static const char __pyx_k_L_ver[] = "L_ver";
-static const char __pyx_k_R_max[] = "R_max";
-static const char __pyx_k_R_min[] = "R_min";
-static const char __pyx_k_class[] = "__class__";
-static const char __pyx_k_dtype[] = "dtype";
-static const char __pyx_k_empty[] = "empty";
-static const char __pyx_k_error[] = "error";
-static const char __pyx_k_flags[] = "flags";
-static const char __pyx_k_numpy[] = "numpy";
-static const char __pyx_k_range[] = "range";
-static const char __pyx_k_shape[] = "shape";
-static const char __pyx_k_start[] = "start";
-static const char __pyx_k_K_bout[] = "K_bout";
-static const char __pyx_k_K_rout[] = "K_rout";
-static const char __pyx_k_beta_B[] = "beta_B";
-static const char __pyx_k_beta_R[] = "beta_R";
-static const char __pyx_k_encode[] = "encode";
-static const char __pyx_k_format[] = "format";
-static const char __pyx_k_import[] = "__import__";
-static const char __pyx_k_name_2[] = "__name__";
-static const char __pyx_k_pickle[] = "pickle";
-static const char __pyx_k_reduce[] = "__reduce__";
-static const char __pyx_k_struct[] = "struct";
-static const char __pyx_k_unpack[] = "unpack";
-static const char __pyx_k_update[] = "update";
-static const char __pyx_k_K_b_hor[] = "K_b_hor";
-static const char __pyx_k_K_b_ver[] = "K_b_ver";
-static const char __pyx_k_K_r_hor[] = "K_r_hor";
-static const char __pyx_k_K_r_ver[] = "K_r_ver";
-static const char __pyx_k_alpha_B[] = "alpha_B";
-static const char __pyx_k_alpha_R[] = "alpha_R";
-static const char __pyx_k_asarray[] = "asarray";
-static const char __pyx_k_float32[] = "float32";
-static const char __pyx_k_fortran[] = "fortran";
-static const char __pyx_k_gamma_1[] = "gamma_1";
-static const char __pyx_k_gamma_2[] = "gamma_2";
-static const char __pyx_k_memview[] = "memview";
-static const char __pyx_k_Ellipsis[] = "Ellipsis";
-static const char __pyx_k_getstate[] = "__getstate__";
-static const char __pyx_k_itemsize[] = "itemsize";
-static const char __pyx_k_pyx_type[] = "__pyx_type";
-static const char __pyx_k_setstate[] = "__setstate__";
-static const char __pyx_k_B_max_hor[] = "B_max_hor";
-static const char __pyx_k_B_max_ver[] = "B_max_ver";
-static const char __pyx_k_B_min_hor[] = "B_min_hor";
-static const char __pyx_k_B_min_ver[] = "B_min_ver";
-static const char __pyx_k_K_bTI_hor[] = "K_bTI_hor";
-static const char __pyx_k_K_bTI_ver[] = "K_bTI_ver";
-static const char __pyx_k_K_rTI_hor[] = "K_rTI_hor";
-static const char __pyx_k_K_rTI_ver[] = "K_rTI_ver";
-static const char __pyx_k_R_max_hor[] = "R_max_hor";
-static const char __pyx_k_R_max_ver[] = "R_max_ver";
-static const char __pyx_k_R_min_hor[] = "R_min_hor";
-static const char __pyx_k_R_min_ver[] = "R_min_ver";
-static const char __pyx_k_TypeError[] = "TypeError";
-static const char __pyx_k_enumerate[] = "enumerate";
-static const char __pyx_k_pyx_state[] = "__pyx_state";
-static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
-static const char __pyx_k_IndexError[] = "IndexError";
-static const char __pyx_k_ValueError[] = "ValueError";
-static const char __pyx_k_pyx_result[] = "__pyx_result";
-static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
-static const char __pyx_k_ImportError[] = "ImportError";
-static const char __pyx_k_MemoryError[] = "MemoryError";
-static const char __pyx_k_PickleError[] = "PickleError";
-static const char __pyx_k_RuntimeError[] = "RuntimeError";
-static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
-static const char __pyx_k_stringsource[] = "stringsource";
-static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
-static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
-static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
-static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
-static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
-static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
-static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
-static const char __pyx_k_chromatic_removal[] = "chromatic_removal";
-static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
-static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
-static const char __pyx_k_strided_and_direct[] = "";
-static const char __pyx_k_strided_and_indirect[] = "";
-static const char __pyx_k_contiguous_and_direct[] = "";
-static const char __pyx_k_MemoryView_of_r_object[] = "";
-static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "";
-static const char __pyx_k_contiguous_and_indirect[] = "";
-static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
-static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
-static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
-static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
-static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
-static const char __pyx_k_strided_and_direct_or_indirect[] = "";
-static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
-static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
-static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
-static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
-static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
-static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
-static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
-static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
-static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
-static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
-static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
-static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
-static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
-static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
-static const char __pyx_k_false_color_filtering_filter_cyt[] = "false_color_filtering/filter_cython.pyx";
-static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
-static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
-static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
-static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
-static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
-static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
-static const char __pyx_k_false_color_filtering_filter_cyt_2[] = "false_color_filtering.filter_cython";
-static PyObject *__pyx_n_s_ASCII;
-static PyObject *__pyx_n_s_B_in;
-static PyObject *__pyx_n_s_B_max;
-static PyObject *__pyx_n_s_B_max_hor;
-static PyObject *__pyx_n_s_B_max_ver;
-static PyObject *__pyx_n_s_B_min;
-static PyObject *__pyx_n_s_B_min_hor;
-static PyObject *__pyx_n_s_B_min_ver;
-static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
-static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
-static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
-static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
-static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
-static PyObject *__pyx_n_s_DTYPE;
-static PyObject *__pyx_n_s_Ellipsis;
-static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
-static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
-static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
-static PyObject *__pyx_n_s_G_in;
-static PyObject *__pyx_n_s_I_in;
-static PyObject *__pyx_n_s_I_out;
-static PyObject *__pyx_n_s_ImportError;
-static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
-static PyObject *__pyx_n_s_IndexError;
-static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
-static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
-static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
-static PyObject *__pyx_n_s_K_b;
-static PyObject *__pyx_n_s_K_bTI;
-static PyObject *__pyx_n_s_K_bTI_hor;
-static PyObject *__pyx_n_s_K_bTI_ver;
-static PyObject *__pyx_n_s_K_b_hor;
-static PyObject *__pyx_n_s_K_b_ver;
-static PyObject *__pyx_n_s_K_bout;
-static PyObject *__pyx_n_s_K_r;
-static PyObject *__pyx_n_s_K_rTI;
-static PyObject *__pyx_n_s_K_rTI_hor;
-static PyObject *__pyx_n_s_K_rTI_ver;
-static PyObject *__pyx_n_s_K_r_hor;
-static PyObject *__pyx_n_s_K_r_ver;
-static PyObject *__pyx_n_s_K_rout;
-static PyObject *__pyx_n_s_L_hor;
-static PyObject *__pyx_n_s_L_ver;
-static PyObject *__pyx_n_s_M;
-static PyObject *__pyx_n_s_MemoryError;
-static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
-static PyObject *__pyx_kp_s_MemoryView_of_r_object;
-static PyObject *__pyx_n_s_N;
-static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
-static PyObject *__pyx_n_b_O;
-static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
-static PyObject *__pyx_n_s_PickleError;
-static PyObject *__pyx_n_s_R_in;
-static PyObject *__pyx_n_s_R_max;
-static PyObject *__pyx_n_s_R_max_hor;
-static PyObject *__pyx_n_s_R_max_ver;
-static PyObject *__pyx_n_s_R_min;
-static PyObject *__pyx_n_s_R_min_hor;
-static PyObject *__pyx_n_s_R_min_ver;
-static PyObject *__pyx_n_s_RuntimeError;
-static PyObject *__pyx_n_s_TypeError;
-static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
-static PyObject *__pyx_n_s_ValueError;
-static PyObject *__pyx_n_s_View_MemoryView;
-static PyObject *__pyx_n_s_Y_in;
-static PyObject *__pyx_n_s_allocate_buffer;
-static PyObject *__pyx_n_s_alpha_B;
-static PyObject *__pyx_n_s_alpha_R;
-static PyObject *__pyx_n_s_asarray;
-static PyObject *__pyx_n_s_base;
-static PyObject *__pyx_n_s_beta_B;
-static PyObject *__pyx_n_s_beta_R;
-static PyObject *__pyx_n_s_c;
-static PyObject *__pyx_n_u_c;
-static PyObject *__pyx_n_s_chromatic_removal;
-static PyObject *__pyx_n_s_class;
-static PyObject *__pyx_n_s_cline_in_traceback;
-static PyObject *__pyx_n_s_clip;
-static PyObject *__pyx_kp_s_contiguous_and_direct;
-static PyObject *__pyx_kp_s_contiguous_and_indirect;
-static PyObject *__pyx_n_s_dict;
-static PyObject *__pyx_n_s_dtype;
-static PyObject *__pyx_n_s_dtype_is_object;
-static PyObject *__pyx_n_s_empty;
-static PyObject *__pyx_n_s_encode;
-static PyObject *__pyx_n_s_enumerate;
-static PyObject *__pyx_n_s_error;
-static PyObject *__pyx_kp_s_false_color_filtering_filter_cyt;
-static PyObject *__pyx_n_s_false_color_filtering_filter_cyt_2;
-static PyObject *__pyx_n_s_flags;
-static PyObject *__pyx_n_s_float32;
-static PyObject *__pyx_n_s_format;
-static PyObject *__pyx_n_s_fortran;
-static PyObject *__pyx_n_u_fortran;
-static PyObject *__pyx_n_s_gamma_1;
-static PyObject *__pyx_n_s_gamma_2;
-static PyObject *__pyx_n_s_getstate;
-static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
-static PyObject *__pyx_n_s_i;
-static PyObject *__pyx_n_s_id;
-static PyObject *__pyx_n_s_import;
-static PyObject *__pyx_n_s_itemsize;
-static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
-static PyObject *__pyx_n_s_j;
-static PyObject *__pyx_n_s_main;
-static PyObject *__pyx_n_s_memview;
-static PyObject *__pyx_n_s_mode;
-static PyObject *__pyx_n_s_name;
-static PyObject *__pyx_n_s_name_2;
-static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
-static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
-static PyObject *__pyx_n_s_ndim;
-static PyObject *__pyx_n_s_new;
-static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
-static PyObject *__pyx_n_s_np;
-static PyObject *__pyx_n_s_numpy;
-static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
-static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
-static PyObject *__pyx_n_s_obj;
-static PyObject *__pyx_n_s_pack;
-static PyObject *__pyx_n_s_pickle;
-static PyObject *__pyx_n_s_pyx_PickleError;
-static PyObject *__pyx_n_s_pyx_checksum;
-static PyObject *__pyx_n_s_pyx_getbuffer;
-static PyObject *__pyx_n_s_pyx_result;
-static PyObject *__pyx_n_s_pyx_state;
-static PyObject *__pyx_n_s_pyx_type;
-static PyObject *__pyx_n_s_pyx_unpickle_Enum;
-static PyObject *__pyx_n_s_pyx_vtable;
-static PyObject *__pyx_n_s_range;
-static PyObject *__pyx_n_s_reduce;
-static PyObject *__pyx_n_s_reduce_cython;
-static PyObject *__pyx_n_s_reduce_ex;
-static PyObject *__pyx_n_s_rho;
-static PyObject *__pyx_n_s_setstate;
-static PyObject *__pyx_n_s_setstate_cython;
-static PyObject *__pyx_n_s_shape;
-static PyObject *__pyx_n_s_size;
-static PyObject *__pyx_n_s_start;
-static PyObject *__pyx_n_s_step;
-static PyObject *__pyx_n_s_stop;
-static PyObject *__pyx_kp_s_strided_and_direct;
-static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
-static PyObject *__pyx_kp_s_strided_and_indirect;
-static PyObject *__pyx_kp_s_stringsource;
-static PyObject *__pyx_n_s_struct;
-static PyObject *__pyx_n_s_tau;
-static PyObject *__pyx_n_s_test;
-static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
-static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
-static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
-static PyObject *__pyx_n_s_unpack;
-static PyObject *__pyx_n_s_update;
-static PyObject *__pyx_pf_21false_color_filtering_13filter_cython_chromatic_removal(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_I_in, int __pyx_v_L_hor, int __pyx_v_L_ver, PyArrayObject *__pyx_v_rho, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_tau, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_R, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_B, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_R, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_B, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_1, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_2); /* proto */
-static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
-static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
-static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_int_0;
-static PyObject *__pyx_int_1;
-static PyObject *__pyx_int_3;
-static PyObject *__pyx_int_184977713;
-static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_tuple_;
-static PyObject *__pyx_tuple__2;
-static PyObject *__pyx_tuple__3;
-static PyObject *__pyx_tuple__4;
-static PyObject *__pyx_tuple__5;
-static PyObject *__pyx_tuple__6;
-static PyObject *__pyx_tuple__7;
-static PyObject *__pyx_tuple__8;
-static PyObject *__pyx_tuple__9;
-static PyObject *__pyx_slice__22;
-static PyObject *__pyx_tuple__10;
-static PyObject *__pyx_tuple__11;
-static PyObject *__pyx_tuple__12;
-static PyObject *__pyx_tuple__13;
-static PyObject *__pyx_tuple__14;
-static PyObject *__pyx_tuple__15;
-static PyObject *__pyx_tuple__16;
-static PyObject *__pyx_tuple__17;
-static PyObject *__pyx_tuple__18;
-static PyObject *__pyx_tuple__19;
-static PyObject *__pyx_tuple__20;
-static PyObject *__pyx_tuple__21;
-static PyObject *__pyx_tuple__23;
-static PyObject *__pyx_tuple__24;
-static PyObject *__pyx_tuple__25;
-static PyObject *__pyx_tuple__26;
-static PyObject *__pyx_tuple__28;
-static PyObject *__pyx_tuple__29;
-static PyObject *__pyx_tuple__30;
-static PyObject *__pyx_tuple__31;
-static PyObject *__pyx_tuple__32;
-static PyObject *__pyx_tuple__33;
-static PyObject *__pyx_codeobj__27;
-static PyObject *__pyx_codeobj__34;
-/* Late includes */
-
-/* "false_color_filtering/filter_cython.pyx":30
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X): # <<<<<<<<<<<<<<
- * cdef Py_ssize_t M = X.shape[0]
- * cdef Py_ssize_t N = X.shape[1]
- */
-
-static __Pyx_memviewslice __pyx_f_21false_color_filtering_13filter_cython_transpose(__Pyx_memviewslice __pyx_v_X) {
- Py_ssize_t __pyx_v_M;
- Py_ssize_t __pyx_v_N;
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_j;
- __Pyx_memviewslice __pyx_v_Xt = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_r = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
- Py_ssize_t __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- Py_ssize_t __pyx_t_12;
- Py_ssize_t __pyx_t_13;
- Py_ssize_t __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("transpose", 0);
-
- /* "false_color_filtering/filter_cython.pyx":31
- * @cython.nonecheck(False)
- * cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X):
- * cdef Py_ssize_t M = X.shape[0] # <<<<<<<<<<<<<<
- * cdef Py_ssize_t N = X.shape[1]
- * cdef Py_ssize_t i, j
- */
- __pyx_v_M = (__pyx_v_X.shape[0]);
-
- /* "false_color_filtering/filter_cython.pyx":32
- * cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X):
- * cdef Py_ssize_t M = X.shape[0]
- * cdef Py_ssize_t N = X.shape[1] # <<<<<<<<<<<<<<
- * cdef Py_ssize_t i, j
- * cdef DTYPE_t[:, ::1] Xt = np.empty((N, M), dtype=DTYPE)
- */
- __pyx_v_N = (__pyx_v_X.shape[1]);
-
- /* "false_color_filtering/filter_cython.pyx":34
- * cdef Py_ssize_t N = X.shape[1]
- * cdef Py_ssize_t i, j
- * cdef DTYPE_t[:, ::1] Xt = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * # for i in range(0, M, 1):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_Xt = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":37
- *
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * Xt[j, i] = X[i, j]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_6 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_6 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":38
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * Xt[j, i] = X[i, j]
- * return Xt
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":39
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * Xt[j, i] = X[i, j] # <<<<<<<<<<<<<<
- * return Xt
- *
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_13 = __pyx_v_j;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_14 * __pyx_v_Xt.strides[0]) )) + __pyx_t_15)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_12 * __pyx_v_X.strides[0]) )) + __pyx_t_13)) )));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":37
- *
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * Xt[j, i] = X[i, j]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":40
- * for j in range(0, N, 1):
- * Xt[j, i] = X[i, j]
- * return Xt # <<<<<<<<<<<<<<
- *
- *
- */
- __PYX_INC_MEMVIEW(&__pyx_v_Xt, 0);
- __pyx_r = __pyx_v_Xt;
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":30
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef DTYPE_t[:, ::1] transpose(DTYPE_t[:, ::1] X): # <<<<<<<<<<<<<<
- * cdef Py_ssize_t M = X.shape[0]
- * cdef Py_ssize_t N = X.shape[1]
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __pyx_r.data = NULL;
- __pyx_r.memview = NULL;
- __Pyx_AddTraceback("false_color_filtering.filter_cython.transpose", __pyx_clineno, __pyx_lineno, __pyx_filename);
- goto __pyx_L2;
- __pyx_L0:;
- if (unlikely(!__pyx_r.memview)) {
- PyErr_SetString(PyExc_TypeError, "Memoryview return value is not initialized");
- }
- __pyx_L2:;
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xt, 1);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "false_color_filtering/filter_cython.pyx":46
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * def chromatic_removal(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver, # <<<<<<<<<<<<<<
- * np.ndarray[DTYPE_t, ndim=1] rho, DTYPE_t tau, DTYPE_t alpha_R, DTYPE_t alpha_B, DTYPE_t beta_R,
- * DTYPE_t beta_B, DTYPE_t gamma_1, DTYPE_t gamma_2):
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_21false_color_filtering_13filter_cython_1chromatic_removal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_21false_color_filtering_13filter_cython_1chromatic_removal = {"chromatic_removal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_21false_color_filtering_13filter_cython_1chromatic_removal, METH_VARARGS|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_21false_color_filtering_13filter_cython_1chromatic_removal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyArrayObject *__pyx_v_I_in = 0;
- int __pyx_v_L_hor;
- int __pyx_v_L_ver;
- PyArrayObject *__pyx_v_rho = 0;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_tau;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_R;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_B;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_R;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_B;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_1;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_2;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("chromatic_removal (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_I_in,&__pyx_n_s_L_hor,&__pyx_n_s_L_ver,&__pyx_n_s_rho,&__pyx_n_s_tau,&__pyx_n_s_alpha_R,&__pyx_n_s_alpha_B,&__pyx_n_s_beta_R,&__pyx_n_s_beta_B,&__pyx_n_s_gamma_1,&__pyx_n_s_gamma_2,0};
- PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
- CYTHON_FALLTHROUGH;
- case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
- CYTHON_FALLTHROUGH;
- case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
- CYTHON_FALLTHROUGH;
- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
- CYTHON_FALLTHROUGH;
- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
- CYTHON_FALLTHROUGH;
- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
- CYTHON_FALLTHROUGH;
- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- CYTHON_FALLTHROUGH;
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_I_in)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_L_hor)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 1); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_L_ver)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 2); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 3:
- if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rho)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 3); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 4:
- if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 4); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 5:
- if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha_R)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 5); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 6:
- if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha_B)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 6); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 7:
- if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_beta_R)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 7); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 8:
- if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_beta_B)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 8); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 9:
- if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gamma_1)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 9); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 10:
- if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gamma_2)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, 10); __PYX_ERR(0, 46, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chromatic_removal") < 0)) __PYX_ERR(0, 46, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
- values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
- values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
- values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
- values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
- values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
- }
- __pyx_v_I_in = ((PyArrayObject *)values[0]);
- __pyx_v_L_hor = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_L_hor == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error)
- __pyx_v_L_ver = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_L_ver == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error)
- __pyx_v_rho = ((PyArrayObject *)values[3]);
- __pyx_v_tau = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_tau == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error)
- __pyx_v_alpha_R = __pyx_PyFloat_AsFloat(values[5]); if (unlikely((__pyx_v_alpha_R == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error)
- __pyx_v_alpha_B = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_alpha_B == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error)
- __pyx_v_beta_R = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_beta_R == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error)
- __pyx_v_beta_B = __pyx_PyFloat_AsFloat(values[8]); if (unlikely((__pyx_v_beta_B == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error)
- __pyx_v_gamma_1 = __pyx_PyFloat_AsFloat(values[9]); if (unlikely((__pyx_v_gamma_1 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error)
- __pyx_v_gamma_2 = __pyx_PyFloat_AsFloat(values[10]); if (unlikely((__pyx_v_gamma_2 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error)
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("chromatic_removal", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 46, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("false_color_filtering.filter_cython.chromatic_removal", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_I_in), __pyx_ptype_5numpy_ndarray, 1, "I_in", 0))) __PYX_ERR(0, 46, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rho), __pyx_ptype_5numpy_ndarray, 1, "rho", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
- __pyx_r = __pyx_pf_21false_color_filtering_13filter_cython_chromatic_removal(__pyx_self, __pyx_v_I_in, __pyx_v_L_hor, __pyx_v_L_ver, __pyx_v_rho, __pyx_v_tau, __pyx_v_alpha_R, __pyx_v_alpha_B, __pyx_v_beta_R, __pyx_v_beta_B, __pyx_v_gamma_1, __pyx_v_gamma_2);
-
- /* function exit code */
- goto __pyx_L0;
- __pyx_L1_error:;
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_21false_color_filtering_13filter_cython_chromatic_removal(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_I_in, int __pyx_v_L_hor, int __pyx_v_L_ver, PyArrayObject *__pyx_v_rho, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_tau, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_R, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_B, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_R, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_B, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_1, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_2) {
- Py_ssize_t __pyx_v_M;
- Py_ssize_t __pyx_v_N;
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_j;
- __Pyx_memviewslice __pyx_v_R_in = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_G_in = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_in = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Y_in = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_r_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_rTI_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_max_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_min_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_b_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_bTI_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_max_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_min_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_r_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_rTI_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_max_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_min_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_b_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_bTI_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_max_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_min_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_b = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_r = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_bTI = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_max = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_B_min = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_rTI = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_max = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_R_min = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_rout = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_bout = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_I_out = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_LocalBuf_ND __pyx_pybuffernd_I_in;
- __Pyx_Buffer __pyx_pybuffer_I_in;
- __Pyx_LocalBuf_ND __pyx_pybuffernd_rho;
- __Pyx_Buffer __pyx_pybuffer_rho;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
- Py_ssize_t __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- Py_ssize_t __pyx_t_12;
- Py_ssize_t __pyx_t_13;
- Py_ssize_t __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- Py_ssize_t __pyx_t_16;
- Py_ssize_t __pyx_t_17;
- Py_ssize_t __pyx_t_18;
- Py_ssize_t __pyx_t_19;
- __Pyx_memviewslice __pyx_t_20 = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_t_22 = { 0, 0, { 0 }, { 0 }, { 0 } };
- int __pyx_t_23;
- __Pyx_memviewslice __pyx_t_24 = { 0, 0, { 0 }, { 0 }, { 0 } };
- PyObject *__pyx_t_25 = NULL;
- PyObject *__pyx_t_26 = NULL;
- int __pyx_t_27;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("chromatic_removal", 0);
- __pyx_pybuffer_I_in.pybuffer.buf = NULL;
- __pyx_pybuffer_I_in.refcount = 0;
- __pyx_pybuffernd_I_in.data = NULL;
- __pyx_pybuffernd_I_in.rcbuffer = &__pyx_pybuffer_I_in;
- __pyx_pybuffer_rho.pybuffer.buf = NULL;
- __pyx_pybuffer_rho.refcount = 0;
- __pyx_pybuffernd_rho.data = NULL;
- __pyx_pybuffernd_rho.rcbuffer = &__pyx_pybuffer_rho;
- {
- __Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_I_in.rcbuffer->pybuffer, (PyObject*)__pyx_v_I_in, &__Pyx_TypeInfo_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 46, __pyx_L1_error)
- }
- __pyx_pybuffernd_I_in.diminfo[0].strides = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_I_in.diminfo[0].shape = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_I_in.diminfo[1].strides = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_I_in.diminfo[1].shape = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_I_in.diminfo[2].strides = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_I_in.diminfo[2].shape = __pyx_pybuffernd_I_in.rcbuffer->pybuffer.shape[2];
- {
- __Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rho.rcbuffer->pybuffer, (PyObject*)__pyx_v_rho, &__Pyx_TypeInfo_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 46, __pyx_L1_error)
- }
- __pyx_pybuffernd_rho.diminfo[0].strides = __pyx_pybuffernd_rho.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rho.diminfo[0].shape = __pyx_pybuffernd_rho.rcbuffer->pybuffer.shape[0];
-
- /* "false_color_filtering/filter_cython.pyx":50
- * DTYPE_t beta_B, DTYPE_t gamma_1, DTYPE_t gamma_2):
- * cdef Py_ssize_t M, N, i, j
- * M = I_in.shape[0] # <<<<<<<<<<<<<<
- * N = I_in.shape[1]
- *
- */
- __pyx_v_M = (__pyx_v_I_in->dimensions[0]);
-
- /* "false_color_filtering/filter_cython.pyx":51
- * cdef Py_ssize_t M, N, i, j
- * M = I_in.shape[0]
- * N = I_in.shape[1] # <<<<<<<<<<<<<<
- *
- * ## Introduction
- */
- __pyx_v_N = (__pyx_v_I_in->dimensions[1]);
-
- /* "false_color_filtering/filter_cython.pyx":54
- *
- * ## Introduction
- * cdef DTYPE_t[:, ::1] R_in = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] G_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_in = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_R_in = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":55
- * ## Introduction
- * cdef DTYPE_t[:, ::1] R_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] G_in = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_G_in = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":56
- * cdef DTYPE_t[:, ::1] R_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] G_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_in = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE)
- * # for i in range(0, M, 1):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_B_in = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":57
- * cdef DTYPE_t[:, ::1] G_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_in = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_Y_in = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":59
- * cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * R_in[i, j] = I_in[i, j, 0]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_6 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_6 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":60
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * R_in[i, j] = I_in[i, j, 0]
- * G_in[i, j] = I_in[i, j, 1]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":61
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * R_in[i, j] = I_in[i, j, 0] # <<<<<<<<<<<<<<
- * G_in[i, j] = I_in[i, j, 1]
- * B_in[i, j] = I_in[i, j, 2]
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_13 = __pyx_v_j;
- __pyx_t_14 = 0;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_in.data + __pyx_t_15 * __pyx_v_R_in.strides[0]) )) + __pyx_t_16)) )) = (*__Pyx_BufPtrStrided3d(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *, __pyx_pybuffernd_I_in.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_I_in.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_I_in.diminfo[1].strides, __pyx_t_14, __pyx_pybuffernd_I_in.diminfo[2].strides));
-
- /* "false_color_filtering/filter_cython.pyx":62
- * for j in range(0, N, 1):
- * R_in[i, j] = I_in[i, j, 0]
- * G_in[i, j] = I_in[i, j, 1] # <<<<<<<<<<<<<<
- * B_in[i, j] = I_in[i, j, 2]
- * Y_in[i, j] = 0.299 * R_in[i, j] + 0.587 * G_in[i, j] + 0.114 * B_in[i, j]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_13 = __pyx_v_j;
- __pyx_t_12 = 1;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_16 * __pyx_v_G_in.strides[0]) )) + __pyx_t_15)) )) = (*__Pyx_BufPtrStrided3d(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *, __pyx_pybuffernd_I_in.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_I_in.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_I_in.diminfo[1].strides, __pyx_t_12, __pyx_pybuffernd_I_in.diminfo[2].strides));
-
- /* "false_color_filtering/filter_cython.pyx":63
- * R_in[i, j] = I_in[i, j, 0]
- * G_in[i, j] = I_in[i, j, 1]
- * B_in[i, j] = I_in[i, j, 2] # <<<<<<<<<<<<<<
- * Y_in[i, j] = 0.299 * R_in[i, j] + 0.587 * G_in[i, j] + 0.114 * B_in[i, j]
- *
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_13 = __pyx_v_j;
- __pyx_t_14 = 2;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_in.data + __pyx_t_15 * __pyx_v_B_in.strides[0]) )) + __pyx_t_16)) )) = (*__Pyx_BufPtrStrided3d(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *, __pyx_pybuffernd_I_in.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_I_in.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_I_in.diminfo[1].strides, __pyx_t_14, __pyx_pybuffernd_I_in.diminfo[2].strides));
-
- /* "false_color_filtering/filter_cython.pyx":64
- * G_in[i, j] = I_in[i, j, 1]
- * B_in[i, j] = I_in[i, j, 2]
- * Y_in[i, j] = 0.299 * R_in[i, j] + 0.587 * G_in[i, j] + 0.114 * B_in[i, j] # <<<<<<<<<<<<<<
- *
- * ## Filtering
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_13 = __pyx_v_j;
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_18 = __pyx_v_i;
- __pyx_t_19 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Y_in.data + __pyx_t_18 * __pyx_v_Y_in.strides[0]) )) + __pyx_t_19)) )) = (((0.299 * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_in.data + __pyx_t_14 * __pyx_v_R_in.strides[0]) )) + __pyx_t_13)) )))) + (0.587 * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_12 * __pyx_v_G_in.strides[0]) )) + __pyx_t_16)) ))))) + (0.114 * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_in.data + __pyx_t_15 * __pyx_v_B_in.strides[0]) )) + __pyx_t_17)) )))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":59
- * cdef DTYPE_t[:, ::1] Y_in = np.empty((M, N), dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * R_in[i, j] = I_in[i, j, 0]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":68
- * ## Filtering
- * # Horizontal pass
- * cdef DTYPE_t[:, ::1] K_r_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_rTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_max_hor = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_r_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":69
- * # Horizontal pass
- * cdef DTYPE_t[:, ::1] K_r_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_rTI_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] R_max_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_min_hor = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_rTI_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":70
- * cdef DTYPE_t[:, ::1] K_r_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_rTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_max_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] R_min_hor = np.empty((M, N), dtype=DTYPE)
- * # K_r_hor, K_rTI_hor, R_max_hor, R_min_hor = ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, tau, alpha_R)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_R_max_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":71
- * cdef DTYPE_t[:, ::1] K_rTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_max_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_min_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # K_r_hor, K_rTI_hor, R_max_hor, R_min_hor = ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, tau, alpha_R)
- * ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, alpha_R, tau, K_r_hor, K_rTI_hor, R_max_hor, R_min_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_R_min_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":73
- * cdef DTYPE_t[:, ::1] R_min_hor = np.empty((M, N), dtype=DTYPE)
- * # K_r_hor, K_rTI_hor, R_max_hor, R_min_hor = ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, tau, alpha_R)
- * ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, alpha_R, tau, K_r_hor, K_rTI_hor, R_max_hor, R_min_hor) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_b_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bTI_hor = np.empty((M, N), dtype=DTYPE)
- */
- __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(((PyObject *)__pyx_v_rho), PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 73, __pyx_L1_error)
- __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__pyx_v_R_in, __pyx_v_G_in, __pyx_v_Y_in, __pyx_v_L_hor, __pyx_t_20, __pyx_v_alpha_R, __pyx_v_tau, __pyx_v_K_r_hor, __pyx_v_K_rTI_hor, __pyx_v_R_max_hor, __pyx_v_R_min_hor);
- __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
- __pyx_t_20.memview = NULL;
- __pyx_t_20.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":74
- * # K_r_hor, K_rTI_hor, R_max_hor, R_min_hor = ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, tau, alpha_R)
- * ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, alpha_R, tau, K_r_hor, K_rTI_hor, R_max_hor, R_min_hor)
- * cdef DTYPE_t[:, ::1] K_b_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_bTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_max_hor = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_b_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":75
- * ti_and_ca_filtering1D(R_in, G_in, Y_in, L_hor, rho, alpha_R, tau, K_r_hor, K_rTI_hor, R_max_hor, R_min_hor)
- * cdef DTYPE_t[:, ::1] K_b_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bTI_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_max_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_min_hor = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_bTI_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":76
- * cdef DTYPE_t[:, ::1] K_b_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_max_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_min_hor = np.empty((M, N), dtype=DTYPE)
- * # K_b_hor, K_bTI_hor, B_max_hor, B_min_hor = ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho, tau, alpha_B)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_B_max_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":77
- * cdef DTYPE_t[:, ::1] K_bTI_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_max_hor = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_min_hor = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # K_b_hor, K_bTI_hor, B_max_hor, B_min_hor = ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho, tau, alpha_B)
- * ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho, alpha_B, tau, K_b_hor, K_bTI_hor, B_max_hor, B_min_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_B_min_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":79
- * cdef DTYPE_t[:, ::1] B_min_hor = np.empty((M, N), dtype=DTYPE)
- * # K_b_hor, K_bTI_hor, B_max_hor, B_min_hor = ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho, tau, alpha_B)
- * ti_and_ca_filtering1D(B_in, G_in, Y_in, L_hor, rho, alpha_B, tau, K_b_hor, K_bTI_hor, B_max_hor, B_min_hor) # <<<<<<<<<<<<<<
- *
- * # Vertical pass
- */
- __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(((PyObject *)__pyx_v_rho), PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 79, __pyx_L1_error)
- __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__pyx_v_B_in, __pyx_v_G_in, __pyx_v_Y_in, __pyx_v_L_hor, __pyx_t_20, __pyx_v_alpha_B, __pyx_v_tau, __pyx_v_K_b_hor, __pyx_v_K_bTI_hor, __pyx_v_B_max_hor, __pyx_v_B_min_hor);
- __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
- __pyx_t_20.memview = NULL;
- __pyx_t_20.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":82
- *
- * # Vertical pass
- * cdef DTYPE_t[:, ::1] K_r_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_rTI_ver = np.empty((N, M), dtype=DTYPE)
- * # cdef DTYPE_t[:, ::1] K_r_ver = transpose(K_r_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_r_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":83
- * # Vertical pass
- * cdef DTYPE_t[:, ::1] K_r_ver = np.empty((N, M), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_rTI_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # cdef DTYPE_t[:, ::1] K_r_ver = transpose(K_r_hor)
- * # cdef DTYPE_t[:, ::1] K_rTI_ver = transpose(K_rTI_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_rTI_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":86
- * # cdef DTYPE_t[:, ::1] K_r_ver = transpose(K_r_hor)
- * # cdef DTYPE_t[:, ::1] K_rTI_ver = transpose(K_rTI_hor)
- * cdef DTYPE_t[:, ::1] R_max_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] R_min_ver = np.empty((N, M), dtype=DTYPE)
- * # K_r_ver, K_rTI_ver, R_max_ver, R_min_ver = ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in),
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_R_max_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":87
- * # cdef DTYPE_t[:, ::1] K_rTI_ver = transpose(K_rTI_hor)
- * cdef DTYPE_t[:, ::1] R_max_ver = np.empty((N, M), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] R_min_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # K_r_ver, K_rTI_ver, R_max_ver, R_min_ver = ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in),
- * # L_ver, rho, tau, alpha_R)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_R_min_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":90
- * # K_r_ver, K_rTI_ver, R_max_ver, R_min_ver = ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in),
- * # L_ver, rho, tau, alpha_R)
- * ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in), L_ver, rho, alpha_R, tau, # <<<<<<<<<<<<<<
- * K_r_ver, K_rTI_ver, R_max_ver, R_min_ver)
- * cdef DTYPE_t[:, ::1] K_b_ver = np.empty((N, M), dtype=DTYPE)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_R_in); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 90, __pyx_L1_error)
- __pyx_t_21 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_G_in); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 90, __pyx_L1_error)
- __pyx_t_22 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_Y_in); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 90, __pyx_L1_error)
- __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(((PyObject *)__pyx_v_rho), PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 90, __pyx_L1_error)
-
- /* "false_color_filtering/filter_cython.pyx":91
- * # L_ver, rho, tau, alpha_R)
- * ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in), L_ver, rho, alpha_R, tau,
- * K_r_ver, K_rTI_ver, R_max_ver, R_min_ver) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_b_ver = np.empty((N, M), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bTI_ver = np.empty((N, M), dtype=DTYPE)
- */
- __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__pyx_t_5, __pyx_t_21, __pyx_t_22, __pyx_v_L_ver, __pyx_t_20, __pyx_v_alpha_R, __pyx_v_tau, __pyx_v_K_r_ver, __pyx_v_K_rTI_ver, __pyx_v_R_max_ver, __pyx_v_R_min_ver);
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
- __pyx_t_21.memview = NULL;
- __pyx_t_21.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1);
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
- __pyx_t_20.memview = NULL;
- __pyx_t_20.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":92
- * ti_and_ca_filtering1D(transpose(R_in), transpose(G_in), transpose(Y_in), L_ver, rho, alpha_R, tau,
- * K_r_ver, K_rTI_ver, R_max_ver, R_min_ver)
- * cdef DTYPE_t[:, ::1] K_b_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_bTI_ver = np.empty((N, M), dtype=DTYPE)
- * # cdef DTYPE_t[:, ::1] K_b_ver = transpose(K_b_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_b_ver = __pyx_t_22;
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":93
- * K_r_ver, K_rTI_ver, R_max_ver, R_min_ver)
- * cdef DTYPE_t[:, ::1] K_b_ver = np.empty((N, M), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bTI_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # cdef DTYPE_t[:, ::1] K_b_ver = transpose(K_b_hor)
- * # cdef DTYPE_t[:, ::1] K_bTI_ver = transpose(K_bTI_hor)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_bTI_ver = __pyx_t_22;
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":96
- * # cdef DTYPE_t[:, ::1] K_b_ver = transpose(K_b_hor)
- * # cdef DTYPE_t[:, ::1] K_bTI_ver = transpose(K_bTI_hor)
- * cdef DTYPE_t[:, ::1] B_max_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_min_ver = np.empty((N, M), dtype=DTYPE)
- * # K_b_ver, K_bTI_ver, B_max_ver, B_min_ver = ti_and_ca_filtering1D(transpose(B_in), transpose(G_in), transpose(Y_in),
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_B_max_ver = __pyx_t_22;
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":97
- * # cdef DTYPE_t[:, ::1] K_bTI_ver = transpose(K_bTI_hor)
- * cdef DTYPE_t[:, ::1] B_max_ver = np.empty((N, M), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] B_min_ver = np.empty((N, M), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # K_b_ver, K_bTI_ver, B_max_ver, B_min_ver = ti_and_ca_filtering1D(transpose(B_in), transpose(G_in), transpose(Y_in),
- * # L_ver, rho, tau, alpha_B)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_B_min_ver = __pyx_t_22;
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":100
- * # K_b_ver, K_bTI_ver, B_max_ver, B_min_ver = ti_and_ca_filtering1D(transpose(B_in), transpose(G_in), transpose(Y_in),
- * # L_ver, rho, tau, alpha_B)
- * ti_and_ca_filtering1D(transpose(B_in), transpose(G_in), transpose(Y_in), L_ver, rho, alpha_B, tau, # <<<<<<<<<<<<<<
- * K_b_ver, K_bTI_ver, B_max_ver, B_min_ver)
- *
- */
- __pyx_t_22 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_B_in); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 100, __pyx_L1_error)
- __pyx_t_21 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_G_in); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 100, __pyx_L1_error)
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_Y_in); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 100, __pyx_L1_error)
- __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(((PyObject *)__pyx_v_rho), PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 100, __pyx_L1_error)
-
- /* "false_color_filtering/filter_cython.pyx":101
- * # L_ver, rho, tau, alpha_B)
- * ti_and_ca_filtering1D(transpose(B_in), transpose(G_in), transpose(Y_in), L_ver, rho, alpha_B, tau,
- * K_b_ver, K_bTI_ver, B_max_ver, B_min_ver) # <<<<<<<<<<<<<<
- *
- * K_r_ver = transpose(K_r_ver)
- */
- __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__pyx_t_22, __pyx_t_21, __pyx_t_5, __pyx_v_L_ver, __pyx_t_20, __pyx_v_alpha_B, __pyx_v_tau, __pyx_v_K_b_ver, __pyx_v_K_bTI_ver, __pyx_v_B_max_ver, __pyx_v_B_min_ver);
- __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1);
- __pyx_t_22.memview = NULL;
- __pyx_t_22.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
- __pyx_t_21.memview = NULL;
- __pyx_t_21.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
- __pyx_t_20.memview = NULL;
- __pyx_t_20.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":103
- * K_b_ver, K_bTI_ver, B_max_ver, B_min_ver)
- *
- * K_r_ver = transpose(K_r_ver) # <<<<<<<<<<<<<<
- * K_b_ver = transpose(K_b_ver)
- * K_rTI_ver = transpose(K_rTI_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_K_r_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 103, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_r_ver, 1);
- __pyx_v_K_r_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":104
- *
- * K_r_ver = transpose(K_r_ver)
- * K_b_ver = transpose(K_b_ver) # <<<<<<<<<<<<<<
- * K_rTI_ver = transpose(K_rTI_ver)
- * K_bTI_ver = transpose(K_bTI_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_K_b_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 104, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_b_ver, 1);
- __pyx_v_K_b_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":105
- * K_r_ver = transpose(K_r_ver)
- * K_b_ver = transpose(K_b_ver)
- * K_rTI_ver = transpose(K_rTI_ver) # <<<<<<<<<<<<<<
- * K_bTI_ver = transpose(K_bTI_ver)
- * R_max_ver = transpose(R_max_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_K_rTI_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 105, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_rTI_ver, 1);
- __pyx_v_K_rTI_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":106
- * K_b_ver = transpose(K_b_ver)
- * K_rTI_ver = transpose(K_rTI_ver)
- * K_bTI_ver = transpose(K_bTI_ver) # <<<<<<<<<<<<<<
- * R_max_ver = transpose(R_max_ver)
- * B_max_ver = transpose(B_max_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_K_bTI_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 106, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_bTI_ver, 1);
- __pyx_v_K_bTI_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":107
- * K_rTI_ver = transpose(K_rTI_ver)
- * K_bTI_ver = transpose(K_bTI_ver)
- * R_max_ver = transpose(R_max_ver) # <<<<<<<<<<<<<<
- * B_max_ver = transpose(B_max_ver)
- * R_min_ver = transpose(R_min_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_R_max_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 107, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_max_ver, 1);
- __pyx_v_R_max_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":108
- * K_bTI_ver = transpose(K_bTI_ver)
- * R_max_ver = transpose(R_max_ver)
- * B_max_ver = transpose(B_max_ver) # <<<<<<<<<<<<<<
- * R_min_ver = transpose(R_min_ver)
- * B_min_ver = transpose(B_min_ver)
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_B_max_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 108, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_max_ver, 1);
- __pyx_v_B_max_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":109
- * R_max_ver = transpose(R_max_ver)
- * B_max_ver = transpose(B_max_ver)
- * R_min_ver = transpose(R_min_ver) # <<<<<<<<<<<<<<
- * B_min_ver = transpose(B_min_ver)
- *
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_R_min_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 109, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_min_ver, 1);
- __pyx_v_R_min_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":110
- * B_max_ver = transpose(B_max_ver)
- * R_min_ver = transpose(R_min_ver)
- * B_min_ver = transpose(B_min_ver) # <<<<<<<<<<<<<<
- *
- * ## Arbitration
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_B_min_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 110, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_min_ver, 1);
- __pyx_v_B_min_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":115
- * # Build the 2D images from the vertically and the horizontally FC filtered images (Eqs. (16))
- * # Kb
- * cdef DTYPE_t[:, ::1] K_b = K_b_ver # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_K_b_ver, 0);
- __pyx_v_K_b = __pyx_v_K_b_ver;
-
- /* "false_color_filtering/filter_cython.pyx":117
- * cdef DTYPE_t[:, ::1] K_b = K_b_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]):
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_8 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_6 = (__pyx_t_8 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_6 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_23, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":118
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]):
- * K_b[i, j] = K_b_hor[i, j]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":119
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]): # <<<<<<<<<<<<<<
- * K_b[i, j] = K_b_hor[i, j]
- *
- */
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_23 = ((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_b_hor.data + __pyx_t_17 * __pyx_v_K_b_hor.strides[0]) )) + __pyx_t_15)) )))) < fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_b_ver.data + __pyx_t_16 * __pyx_v_K_b_ver.strides[0]) )) + __pyx_t_12)) ))))) != 0);
- if (__pyx_t_23) {
-
- /* "false_color_filtering/filter_cython.pyx":120
- * for j in range(0, N, 1):
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]):
- * K_b[i, j] = K_b_hor[i, j] # <<<<<<<<<<<<<<
- *
- * #Kr
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_b.data + __pyx_t_15 * __pyx_v_K_b.strides[0]) )) + __pyx_t_17)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_b_hor.data + __pyx_t_12 * __pyx_v_K_b_hor.strides[0]) )) + __pyx_t_16)) )));
-
- /* "false_color_filtering/filter_cython.pyx":119
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]): # <<<<<<<<<<<<<<
- * K_b[i, j] = K_b_hor[i, j]
- *
- */
- }
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":117
- * cdef DTYPE_t[:, ::1] K_b = K_b_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_b_hor[i, j]) < fabs(K_b_ver[i, j]):
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L16;
- }
- __pyx_L16:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":123
- *
- * #Kr
- * cdef DTYPE_t[:, ::1] K_r = K_r_ver # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_K_r_ver, 0);
- __pyx_v_K_r = __pyx_v_K_r_ver;
-
- /* "false_color_filtering/filter_cython.pyx":125
- * cdef DTYPE_t[:, ::1] K_r = K_r_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]):
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_6 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_6 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_23, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":126
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]):
- * K_r[i, j] = K_r_hor[i, j]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":127
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]): # <<<<<<<<<<<<<<
- * K_r[i, j] = K_r_hor[i, j]
- *
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_23 = ((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_r_hor.data + __pyx_t_16 * __pyx_v_K_r_hor.strides[0]) )) + __pyx_t_12)) )))) < fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_r_ver.data + __pyx_t_17 * __pyx_v_K_r_ver.strides[0]) )) + __pyx_t_15)) ))))) != 0);
- if (__pyx_t_23) {
-
- /* "false_color_filtering/filter_cython.pyx":128
- * for j in range(0, N, 1):
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]):
- * K_r[i, j] = K_r_hor[i, j] # <<<<<<<<<<<<<<
- *
- * # Build the 2D images from the vertically and the horizontally TI filtered images (Eqs. (18))
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_r.data + __pyx_t_12 * __pyx_v_K_r.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_r_hor.data + __pyx_t_15 * __pyx_v_K_r_hor.strides[0]) )) + __pyx_t_17)) )));
-
- /* "false_color_filtering/filter_cython.pyx":127
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]): # <<<<<<<<<<<<<<
- * K_r[i, j] = K_r_hor[i, j]
- *
- */
- }
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":125
- * cdef DTYPE_t[:, ::1] K_r = K_r_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_r_hor[i, j]) < fabs(K_r_ver[i, j]):
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L28;
- }
- __pyx_L28:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":132
- * # Build the 2D images from the vertically and the horizontally TI filtered images (Eqs. (18))
- * # Kb
- * cdef DTYPE_t[:, ::1] K_bTI = K_bTI_ver # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_max = B_max_ver
- * cdef DTYPE_t[:, ::1] B_min = B_min_ver
- */
- __PYX_INC_MEMVIEW(&__pyx_v_K_bTI_ver, 0);
- __pyx_v_K_bTI = __pyx_v_K_bTI_ver;
-
- /* "false_color_filtering/filter_cython.pyx":133
- * # Kb
- * cdef DTYPE_t[:, ::1] K_bTI = K_bTI_ver
- * cdef DTYPE_t[:, ::1] B_max = B_max_ver # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] B_min = B_min_ver
- * # for i in range(0, M, 1):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_B_max_ver, 0);
- __pyx_v_B_max = __pyx_v_B_max_ver;
-
- /* "false_color_filtering/filter_cython.pyx":134
- * cdef DTYPE_t[:, ::1] K_bTI = K_bTI_ver
- * cdef DTYPE_t[:, ::1] B_max = B_max_ver
- * cdef DTYPE_t[:, ::1] B_min = B_min_ver # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_B_min_ver, 0);
- __pyx_v_B_min = __pyx_v_B_min_ver;
-
- /* "false_color_filtering/filter_cython.pyx":136
- * cdef DTYPE_t[:, ::1] B_min = B_min_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]):
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_8 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_6 = (__pyx_t_8 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_6 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_23, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":137
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]):
- * K_bTI[i, j] = K_bTI_hor[i, j]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":138
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]): # <<<<<<<<<<<<<<
- * K_bTI[i, j] = K_bTI_hor[i, j]
- * B_max[i, j] = B_max_hor[i, j]
- */
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_23 = ((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_bTI_hor.data + __pyx_t_17 * __pyx_v_K_bTI_hor.strides[0]) )) + __pyx_t_15)) )))) < fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_bTI_ver.data + __pyx_t_16 * __pyx_v_K_bTI_ver.strides[0]) )) + __pyx_t_12)) ))))) != 0);
- if (__pyx_t_23) {
-
- /* "false_color_filtering/filter_cython.pyx":139
- * for j in range(0, N, 1):
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]):
- * K_bTI[i, j] = K_bTI_hor[i, j] # <<<<<<<<<<<<<<
- * B_max[i, j] = B_max_hor[i, j]
- * B_min[i, j] = B_min_hor[i, j]
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_bTI.data + __pyx_t_15 * __pyx_v_K_bTI.strides[0]) )) + __pyx_t_17)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_bTI_hor.data + __pyx_t_12 * __pyx_v_K_bTI_hor.strides[0]) )) + __pyx_t_16)) )));
-
- /* "false_color_filtering/filter_cython.pyx":140
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]):
- * K_bTI[i, j] = K_bTI_hor[i, j]
- * B_max[i, j] = B_max_hor[i, j] # <<<<<<<<<<<<<<
- * B_min[i, j] = B_min_hor[i, j]
- *
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_max.data + __pyx_t_17 * __pyx_v_B_max.strides[0]) )) + __pyx_t_15)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_max_hor.data + __pyx_t_16 * __pyx_v_B_max_hor.strides[0]) )) + __pyx_t_12)) )));
-
- /* "false_color_filtering/filter_cython.pyx":141
- * K_bTI[i, j] = K_bTI_hor[i, j]
- * B_max[i, j] = B_max_hor[i, j]
- * B_min[i, j] = B_min_hor[i, j] # <<<<<<<<<<<<<<
- *
- * # Kr
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_min.data + __pyx_t_15 * __pyx_v_B_min.strides[0]) )) + __pyx_t_17)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_B_min_hor.data + __pyx_t_12 * __pyx_v_B_min_hor.strides[0]) )) + __pyx_t_16)) )));
-
- /* "false_color_filtering/filter_cython.pyx":138
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]): # <<<<<<<<<<<<<<
- * K_bTI[i, j] = K_bTI_hor[i, j]
- * B_max[i, j] = B_max_hor[i, j]
- */
- }
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":136
- * cdef DTYPE_t[:, ::1] B_min = B_min_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_bTI_hor[i, j]) < fabs(K_bTI_ver[i, j]):
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L40;
- }
- __pyx_L40:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":144
- *
- * # Kr
- * cdef DTYPE_t[:, ::1] K_rTI = K_rTI_ver # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] R_max = R_max_ver
- * cdef DTYPE_t[:, ::1] R_min = R_min_ver
- */
- __PYX_INC_MEMVIEW(&__pyx_v_K_rTI_ver, 0);
- __pyx_v_K_rTI = __pyx_v_K_rTI_ver;
-
- /* "false_color_filtering/filter_cython.pyx":145
- * # Kr
- * cdef DTYPE_t[:, ::1] K_rTI = K_rTI_ver
- * cdef DTYPE_t[:, ::1] R_max = R_max_ver # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] R_min = R_min_ver
- * # for i in range(0, M, 1):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_R_max_ver, 0);
- __pyx_v_R_max = __pyx_v_R_max_ver;
-
- /* "false_color_filtering/filter_cython.pyx":146
- * cdef DTYPE_t[:, ::1] K_rTI = K_rTI_ver
- * cdef DTYPE_t[:, ::1] R_max = R_max_ver
- * cdef DTYPE_t[:, ::1] R_min = R_min_ver # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(M, nogil=True):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_R_min_ver, 0);
- __pyx_v_R_min = __pyx_v_R_min_ver;
-
- /* "false_color_filtering/filter_cython.pyx":148
- * cdef DTYPE_t[:, ::1] R_min = R_min_ver
- * # for i in range(0, M, 1):
- * for i in prange(M, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]):
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_6 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_6 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_23, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":149
- * # for i in range(0, M, 1):
- * for i in prange(M, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]):
- * K_rTI[i, j] = K_rTI_hor[i, j]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":150
- * for i in prange(M, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]): # <<<<<<<<<<<<<<
- * K_rTI[i, j] = K_rTI_hor[i, j]
- * R_max[i, j] = R_max_hor[i, j]
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_23 = ((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_rTI_hor.data + __pyx_t_16 * __pyx_v_K_rTI_hor.strides[0]) )) + __pyx_t_12)) )))) < fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_rTI_ver.data + __pyx_t_17 * __pyx_v_K_rTI_ver.strides[0]) )) + __pyx_t_15)) ))))) != 0);
- if (__pyx_t_23) {
-
- /* "false_color_filtering/filter_cython.pyx":151
- * for j in range(0, N, 1):
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]):
- * K_rTI[i, j] = K_rTI_hor[i, j] # <<<<<<<<<<<<<<
- * R_max[i, j] = R_max_hor[i, j]
- * R_min[i, j] = R_min_hor[i, j]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_rTI.data + __pyx_t_12 * __pyx_v_K_rTI.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_rTI_hor.data + __pyx_t_15 * __pyx_v_K_rTI_hor.strides[0]) )) + __pyx_t_17)) )));
-
- /* "false_color_filtering/filter_cython.pyx":152
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]):
- * K_rTI[i, j] = K_rTI_hor[i, j]
- * R_max[i, j] = R_max_hor[i, j] # <<<<<<<<<<<<<<
- * R_min[i, j] = R_min_hor[i, j]
- *
- */
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_max.data + __pyx_t_16 * __pyx_v_R_max.strides[0]) )) + __pyx_t_12)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_max_hor.data + __pyx_t_17 * __pyx_v_R_max_hor.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":153
- * K_rTI[i, j] = K_rTI_hor[i, j]
- * R_max[i, j] = R_max_hor[i, j]
- * R_min[i, j] = R_min_hor[i, j] # <<<<<<<<<<<<<<
- *
- * # Contrast arbitration
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_min.data + __pyx_t_12 * __pyx_v_R_min.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_R_min_hor.data + __pyx_t_15 * __pyx_v_R_min_hor.strides[0]) )) + __pyx_t_17)) )));
-
- /* "false_color_filtering/filter_cython.pyx":150
- * for i in prange(M, nogil=True):
- * for j in range(0, N, 1):
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]): # <<<<<<<<<<<<<<
- * K_rTI[i, j] = K_rTI_hor[i, j]
- * R_max[i, j] = R_max_hor[i, j]
- */
- }
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":148
- * cdef DTYPE_t[:, ::1] R_min = R_min_ver
- * # for i in range(0, M, 1):
- * for i in prange(M, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if fabs(K_rTI_hor[i, j]) < fabs(K_rTI_ver[i, j]):
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L52;
- }
- __pyx_L52:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":156
- *
- * # Contrast arbitration
- * cdef DTYPE_t[:, ::1] K_rout = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_bout = np.empty((M, N), dtype=DTYPE)
- * arbitration(K_r, K_rTI, R_in, G_in, R_max, R_min, beta_R, L_hor, L_ver, gamma_1, gamma_2, K_rout)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_rout = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":157
- * # Contrast arbitration
- * cdef DTYPE_t[:, ::1] K_rout = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bout = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * arbitration(K_r, K_rTI, R_in, G_in, R_max, R_min, beta_R, L_hor, L_ver, gamma_1, gamma_2, K_rout)
- * arbitration(K_b, K_bTI, B_in, G_in, B_max, B_min, beta_B, L_hor, L_ver, gamma_1, gamma_2, K_bout)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_bout = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":158
- * cdef DTYPE_t[:, ::1] K_rout = np.empty((M, N), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_bout = np.empty((M, N), dtype=DTYPE)
- * arbitration(K_r, K_rTI, R_in, G_in, R_max, R_min, beta_R, L_hor, L_ver, gamma_1, gamma_2, K_rout) # <<<<<<<<<<<<<<
- * arbitration(K_b, K_bTI, B_in, G_in, B_max, B_min, beta_B, L_hor, L_ver, gamma_1, gamma_2, K_bout)
- *
- */
- __pyx_f_21false_color_filtering_13filter_cython_arbitration(__pyx_v_K_r, __pyx_v_K_rTI, __pyx_v_R_in, __pyx_v_G_in, __pyx_v_R_max, __pyx_v_R_min, __pyx_v_beta_R, __pyx_v_L_hor, __pyx_v_L_ver, __pyx_v_gamma_1, __pyx_v_gamma_2, __pyx_v_K_rout);
-
- /* "false_color_filtering/filter_cython.pyx":159
- * cdef DTYPE_t[:, ::1] K_bout = np.empty((M, N), dtype=DTYPE)
- * arbitration(K_r, K_rTI, R_in, G_in, R_max, R_min, beta_R, L_hor, L_ver, gamma_1, gamma_2, K_rout)
- * arbitration(K_b, K_bTI, B_in, G_in, B_max, B_min, beta_B, L_hor, L_ver, gamma_1, gamma_2, K_bout) # <<<<<<<<<<<<<<
- *
- * # K_rout = K_r
- */
- __pyx_f_21false_color_filtering_13filter_cython_arbitration(__pyx_v_K_b, __pyx_v_K_bTI, __pyx_v_B_in, __pyx_v_G_in, __pyx_v_B_max, __pyx_v_B_min, __pyx_v_beta_B, __pyx_v_L_hor, __pyx_v_L_ver, __pyx_v_gamma_1, __pyx_v_gamma_2, __pyx_v_K_bout);
-
- /* "false_color_filtering/filter_cython.pyx":165
- *
- * # Final RGB conversion (Eq. (24))
- * cdef DTYPE_t[:, :, ::1] I_out = np.empty((M, N, 3), dtype=DTYPE) # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __Pyx_INCREF(__pyx_int_3);
- __Pyx_GIVEREF(__pyx_int_3);
- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_I_out = __pyx_t_24;
- __pyx_t_24.memview = NULL;
- __pyx_t_24.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":167
- * cdef DTYPE_t[:, :, ::1] I_out = np.empty((M, N, 3), dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_8 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_6 = (__pyx_t_8 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_6 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_19, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_7);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":168
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
- * I_out[i, j, 1] = G_in[i, j]
- */
- __pyx_t_9 = __pyx_v_N;
- __pyx_t_10 = __pyx_t_9;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
- __pyx_v_j = __pyx_t_11;
-
- /* "false_color_filtering/filter_cython.pyx":169
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j] # <<<<<<<<<<<<<<
- * I_out[i, j, 1] = G_in[i, j]
- * I_out[i, j, 2] = K_bout[i, j] + G_in[i, j]
- */
- __pyx_t_17 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_13 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_19 = 0;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=2 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_I_out.data + __pyx_t_13 * __pyx_v_I_out.strides[0]) ) + __pyx_t_14 * __pyx_v_I_out.strides[1]) )) + __pyx_t_19)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_rout.data + __pyx_t_17 * __pyx_v_K_rout.strides[0]) )) + __pyx_t_15)) ))) + (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_16 * __pyx_v_G_in.strides[0]) )) + __pyx_t_12)) ))));
-
- /* "false_color_filtering/filter_cython.pyx":170
- * for j in range(0, N, 1):
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
- * I_out[i, j, 1] = G_in[i, j] # <<<<<<<<<<<<<<
- * I_out[i, j, 2] = K_bout[i, j] + G_in[i, j]
- *
- */
- __pyx_t_12 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_19 = 1;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=2 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_I_out.data + __pyx_t_15 * __pyx_v_I_out.strides[0]) ) + __pyx_t_17 * __pyx_v_I_out.strides[1]) )) + __pyx_t_19)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_12 * __pyx_v_G_in.strides[0]) )) + __pyx_t_16)) )));
-
- /* "false_color_filtering/filter_cython.pyx":171
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
- * I_out[i, j, 1] = G_in[i, j]
- * I_out[i, j, 2] = K_bout[i, j] + G_in[i, j] # <<<<<<<<<<<<<<
- *
- * return np.clip(np.asarray(I_out), 0, 1)
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- __pyx_t_19 = __pyx_v_i;
- __pyx_t_17 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_13 = 2;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=2 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_I_out.data + __pyx_t_15 * __pyx_v_I_out.strides[0]) ) + __pyx_t_14 * __pyx_v_I_out.strides[1]) )) + __pyx_t_13)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_bout.data + __pyx_t_16 * __pyx_v_K_bout.strides[0]) )) + __pyx_t_12)) ))) + (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_19 * __pyx_v_G_in.strides[0]) )) + __pyx_t_17)) ))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":167
- * cdef DTYPE_t[:, :, ::1] I_out = np.empty((M, N, 3), dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * I_out[i, j, 0] = K_rout[i, j] + G_in[i, j]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L64;
- }
- __pyx_L64:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":173
- * I_out[i, j, 2] = K_bout[i, j] + G_in[i, j]
- *
- * return np.clip(np.asarray(I_out), 0, 1) # <<<<<<<<<<<<<<
- *
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_25);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_I_out, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_26 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
- __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_25);
- if (likely(__pyx_t_26)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
- __Pyx_INCREF(__pyx_t_26);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_25, function);
- }
- }
- __pyx_t_4 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_26, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_t_2);
- __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
- __pyx_t_25 = NULL;
- __pyx_t_27 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_3);
- if (likely(__pyx_t_25)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_25);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_3, function);
- __pyx_t_27 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[4] = {__pyx_t_25, __pyx_t_4, __pyx_int_0, __pyx_int_1};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_27, 3+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[4] = {__pyx_t_25, __pyx_t_4, __pyx_int_0, __pyx_int_1};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_27, 3+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- #endif
- {
- __pyx_t_2 = PyTuple_New(3+__pyx_t_27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (__pyx_t_25) {
- __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_25); __pyx_t_25 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_27, __pyx_t_4);
- __Pyx_INCREF(__pyx_int_0);
- __Pyx_GIVEREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_27, __pyx_int_0);
- __Pyx_INCREF(__pyx_int_1);
- __Pyx_GIVEREF(__pyx_int_1);
- PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_27, __pyx_int_1);
- __pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":46
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * def chromatic_removal(np.ndarray[DTYPE_t, ndim=3] I_in, int L_hor, int L_ver, # <<<<<<<<<<<<<<
- * np.ndarray[DTYPE_t, ndim=1] rho, DTYPE_t tau, DTYPE_t alpha_R, DTYPE_t alpha_B, DTYPE_t beta_R,
- * DTYPE_t beta_B, DTYPE_t gamma_1, DTYPE_t gamma_2):
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
- __Pyx_XDECREF(__pyx_t_25);
- __Pyx_XDECREF(__pyx_t_26);
- { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_I_in.rcbuffer->pybuffer);
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rho.rcbuffer->pybuffer);
- __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
- __Pyx_AddTraceback("false_color_filtering.filter_cython.chromatic_removal", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- goto __pyx_L2;
- __pyx_L0:;
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_I_in.rcbuffer->pybuffer);
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rho.rcbuffer->pybuffer);
- __pyx_L2:;
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_in, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_G_in, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_in, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Y_in, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_r_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_rTI_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_max_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_min_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_b_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_bTI_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_max_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_min_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_r_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_rTI_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_max_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_min_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_b_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_bTI_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_max_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_min_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_b, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_r, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_bTI, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_max, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_B_min, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_rTI, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_max, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_R_min, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_rout, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_bout, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_I_out, 1);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "false_color_filtering/filter_cython.pyx":179
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef void grad(DTYPE_t[:, ::1] X, Py_ssize_t M, Py_ssize_t N, DTYPE_t[:, ::1] grad_X) nogil: # <<<<<<<<<<<<<<
- * cdef Py_ssize_t i, j
- * # for i in range(0, M, 1):
- */
-
-static void __pyx_f_21false_color_filtering_13filter_cython_grad(__Pyx_memviewslice __pyx_v_X, CYTHON_UNUSED Py_ssize_t __pyx_v_M, Py_ssize_t __pyx_v_N, __Pyx_memviewslice __pyx_v_grad_X) {
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_j;
- Py_ssize_t __pyx_t_1;
- Py_ssize_t __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- Py_ssize_t __pyx_t_5;
- Py_ssize_t __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- Py_ssize_t __pyx_t_12;
-
- /* "false_color_filtering/filter_cython.pyx":182
- * cdef Py_ssize_t i, j
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(1, N, 1):
- * grad_X[i, j] = X[i, j] - X[i, j - 1]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_1 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_3 = (__pyx_t_1 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_3 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_3; __pyx_t_2++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_2);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":183
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(1, N, 1): # <<<<<<<<<<<<<<
- * grad_X[i, j] = X[i, j] - X[i, j - 1]
- *
- */
- __pyx_t_4 = __pyx_v_N;
- __pyx_t_5 = __pyx_t_4;
- for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
- __pyx_v_j = __pyx_t_6;
-
- /* "false_color_filtering/filter_cython.pyx":184
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(1, N, 1):
- * grad_X[i, j] = X[i, j] - X[i, j - 1] # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_8 = __pyx_v_j;
- __pyx_t_9 = __pyx_v_i;
- __pyx_t_10 = (__pyx_v_j - 1);
- __pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_grad_X.data + __pyx_t_11 * __pyx_v_grad_X.strides[0]) )) + __pyx_t_12)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_7 * __pyx_v_X.strides[0]) )) + __pyx_t_8)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_9 * __pyx_v_X.strides[0]) )) + __pyx_t_10)) ))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":182
- * cdef Py_ssize_t i, j
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(1, N, 1):
- * grad_X[i, j] = X[i, j] - X[i, j - 1]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":179
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef void grad(DTYPE_t[:, ::1] X, Py_ssize_t M, Py_ssize_t N, DTYPE_t[:, ::1] grad_X) nogil: # <<<<<<<<<<<<<<
- * cdef Py_ssize_t i, j
- * # for i in range(0, M, 1):
- */
-
- /* function exit code */
-}
-
-/* "false_color_filtering/filter_cython.pyx":190
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef int sign(DTYPE_t input) nogil: # <<<<<<<<<<<<<<
- * if input > 0:
- * return 1
- */
-
-static int __pyx_f_21false_color_filtering_13filter_cython_sign(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_input) {
- int __pyx_r;
- int __pyx_t_1;
-
- /* "false_color_filtering/filter_cython.pyx":191
- * @cython.nonecheck(False)
- * cdef int sign(DTYPE_t input) nogil:
- * if input > 0: # <<<<<<<<<<<<<<
- * return 1
- * elif input < 0:
- */
- __pyx_t_1 = ((__pyx_v_input > 0.0) != 0);
- if (__pyx_t_1) {
-
- /* "false_color_filtering/filter_cython.pyx":192
- * cdef int sign(DTYPE_t input) nogil:
- * if input > 0:
- * return 1 # <<<<<<<<<<<<<<
- * elif input < 0:
- * return -1
- */
- __pyx_r = 1;
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":191
- * @cython.nonecheck(False)
- * cdef int sign(DTYPE_t input) nogil:
- * if input > 0: # <<<<<<<<<<<<<<
- * return 1
- * elif input < 0:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":193
- * if input > 0:
- * return 1
- * elif input < 0: # <<<<<<<<<<<<<<
- * return -1
- * else:
- */
- __pyx_t_1 = ((__pyx_v_input < 0.0) != 0);
- if (__pyx_t_1) {
-
- /* "false_color_filtering/filter_cython.pyx":194
- * return 1
- * elif input < 0:
- * return -1 # <<<<<<<<<<<<<<
- * else:
- * return 0
- */
- __pyx_r = -1;
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":193
- * if input > 0:
- * return 1
- * elif input < 0: # <<<<<<<<<<<<<<
- * return -1
- * else:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":196
- * return -1
- * else:
- * return 0 # <<<<<<<<<<<<<<
- *
- *
- */
- /*else*/ {
- __pyx_r = 0;
- goto __pyx_L0;
- }
-
- /* "false_color_filtering/filter_cython.pyx":190
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef int sign(DTYPE_t input) nogil: # <<<<<<<<<<<<<<
- * if input > 0:
- * return 1
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "false_color_filtering/filter_cython.pyx":202
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef DTYPE_t clip(DTYPE_t K, DTYPE_t K_ref) nogil: # <<<<<<<<<<<<<<
- * ## Compute clip (Eq. (9))
- * if K_ref > 0:
- */
-
-static __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_f_21false_color_filtering_13filter_cython_clip(__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_K, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_K_ref) {
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_r;
- int __pyx_t_1;
-
- /* "false_color_filtering/filter_cython.pyx":204
- * cdef DTYPE_t clip(DTYPE_t K, DTYPE_t K_ref) nogil:
- * ## Compute clip (Eq. (9))
- * if K_ref > 0: # <<<<<<<<<<<<<<
- * return fmin(K, K_ref)
- * elif K_ref < 0:
- */
- __pyx_t_1 = ((__pyx_v_K_ref > 0.0) != 0);
- if (__pyx_t_1) {
-
- /* "false_color_filtering/filter_cython.pyx":205
- * ## Compute clip (Eq. (9))
- * if K_ref > 0:
- * return fmin(K, K_ref) # <<<<<<<<<<<<<<
- * elif K_ref < 0:
- * return fmax(K, K_ref)
- */
- __pyx_r = fmin(__pyx_v_K, __pyx_v_K_ref);
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":204
- * cdef DTYPE_t clip(DTYPE_t K, DTYPE_t K_ref) nogil:
- * ## Compute clip (Eq. (9))
- * if K_ref > 0: # <<<<<<<<<<<<<<
- * return fmin(K, K_ref)
- * elif K_ref < 0:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":206
- * if K_ref > 0:
- * return fmin(K, K_ref)
- * elif K_ref < 0: # <<<<<<<<<<<<<<
- * return fmax(K, K_ref)
- * else:
- */
- __pyx_t_1 = ((__pyx_v_K_ref < 0.0) != 0);
- if (__pyx_t_1) {
-
- /* "false_color_filtering/filter_cython.pyx":207
- * return fmin(K, K_ref)
- * elif K_ref < 0:
- * return fmax(K, K_ref) # <<<<<<<<<<<<<<
- * else:
- * return K_ref
- */
- __pyx_r = fmax(__pyx_v_K, __pyx_v_K_ref);
- goto __pyx_L0;
-
- /* "false_color_filtering/filter_cython.pyx":206
- * if K_ref > 0:
- * return fmin(K, K_ref)
- * elif K_ref < 0: # <<<<<<<<<<<<<<
- * return fmax(K, K_ref)
- * else:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":209
- * return fmax(K, K_ref)
- * else:
- * return K_ref # <<<<<<<<<<<<<<
- *
- *
- */
- /*else*/ {
- __pyx_r = __pyx_v_K_ref;
- goto __pyx_L0;
- }
-
- /* "false_color_filtering/filter_cython.pyx":202
- * @cython.wraparound(False)
- * @cython.nonecheck(False)
- * cdef DTYPE_t clip(DTYPE_t K, DTYPE_t K_ref) nogil: # <<<<<<<<<<<<<<
- * ## Compute clip (Eq. (9))
- * if K_ref > 0:
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "false_color_filtering/filter_cython.pyx":216
- * @cython.nonecheck(False)
- * @cython.cdivision(True)
- * cdef void ti_and_ca_filtering1D(DTYPE_t[:, ::1] X_in, DTYPE_t[:, ::1] G_in, DTYPE_t[:, ::1] Y_in, int L, # <<<<<<<<<<<<<<
- * DTYPE_t[::1] rho, DTYPE_t alpha_X, DTYPE_t tau, DTYPE_t[:, ::1] K_hor,
- * DTYPE_t[:, ::1] K_TI_hor, DTYPE_t[:, ::1] X_max, DTYPE_t[:, ::1] X_min):
- */
-
-static void __pyx_f_21false_color_filtering_13filter_cython_ti_and_ca_filtering1D(__Pyx_memviewslice __pyx_v_X_in, __Pyx_memviewslice __pyx_v_G_in, __Pyx_memviewslice __pyx_v_Y_in, int __pyx_v_L, __Pyx_memviewslice __pyx_v_rho, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_alpha_X, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_tau, __Pyx_memviewslice __pyx_v_K_hor, __Pyx_memviewslice __pyx_v_K_TI_hor, __Pyx_memviewslice __pyx_v_X_max, __Pyx_memviewslice __pyx_v_X_min) {
- Py_ssize_t __pyx_v_M;
- Py_ssize_t __pyx_v_N;
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_j;
- int __pyx_v_l;
- int __pyx_v_LL;
- __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_eps;
- __Pyx_memviewslice __pyx_v_grad_X = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_grad_G = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_TImax = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_TImin = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_TI = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_pf = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_K_TI = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_W_K = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_W_K_sum = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emax = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emin = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmax = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmin = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
- int __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- Py_ssize_t __pyx_t_12;
- Py_ssize_t __pyx_t_13;
- Py_ssize_t __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- Py_ssize_t __pyx_t_16;
- int __pyx_t_17;
- int __pyx_t_18;
- int __pyx_t_19;
- int __pyx_t_20;
- Py_ssize_t __pyx_t_21;
- Py_ssize_t __pyx_t_22;
- Py_ssize_t __pyx_t_23;
- Py_ssize_t __pyx_t_24;
- Py_ssize_t __pyx_t_25;
- Py_ssize_t __pyx_t_26;
- Py_ssize_t __pyx_t_27;
- Py_ssize_t __pyx_t_28;
- int __pyx_t_29;
- Py_ssize_t __pyx_t_30;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("ti_and_ca_filtering1D", 0);
-
- /* "false_color_filtering/filter_cython.pyx":221
- *
- * cdef Py_ssize_t M, N, i, j
- * cdef int l = 0 # <<<<<<<<<<<<<<
- * cdef int LL = 2 * L + 1
- * cdef DTYPE_t eps = 1e-8
- */
- __pyx_v_l = 0;
-
- /* "false_color_filtering/filter_cython.pyx":222
- * cdef Py_ssize_t M, N, i, j
- * cdef int l = 0
- * cdef int LL = 2 * L + 1 # <<<<<<<<<<<<<<
- * cdef DTYPE_t eps = 1e-8
- *
- */
- __pyx_v_LL = ((2 * __pyx_v_L) + 1);
-
- /* "false_color_filtering/filter_cython.pyx":223
- * cdef int l = 0
- * cdef int LL = 2 * L + 1
- * cdef DTYPE_t eps = 1e-8 # <<<<<<<<<<<<<<
- *
- * M = X_in.shape[0]
- */
- __pyx_v_eps = 1e-8;
-
- /* "false_color_filtering/filter_cython.pyx":225
- * cdef DTYPE_t eps = 1e-8
- *
- * M = X_in.shape[0] # <<<<<<<<<<<<<<
- * N = X_in.shape[1]
- *
- */
- __pyx_v_M = (__pyx_v_X_in.shape[0]);
-
- /* "false_color_filtering/filter_cython.pyx":226
- *
- * M = X_in.shape[0]
- * N = X_in.shape[1] # <<<<<<<<<<<<<<
- *
- * ## Compute the horizontal gradients
- */
- __pyx_v_N = (__pyx_v_X_in.shape[1]);
-
- /* "false_color_filtering/filter_cython.pyx":229
- *
- * ## Compute the horizontal gradients
- * cdef DTYPE_t[:, ::1] grad_X = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * grad(X_in, M, N, grad_X)
- * cdef DTYPE_t[:, ::1] grad_G = np.empty((M, N), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_grad_X = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":230
- * ## Compute the horizontal gradients
- * cdef DTYPE_t[:, ::1] grad_X = np.empty((M, N), dtype=DTYPE)
- * grad(X_in, M, N, grad_X) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] grad_G = np.empty((M, N), dtype=DTYPE)
- * grad(G_in, M, N, grad_G)
- */
- __pyx_f_21false_color_filtering_13filter_cython_grad(__pyx_v_X_in, __pyx_v_M, __pyx_v_N, __pyx_v_grad_X);
-
- /* "false_color_filtering/filter_cython.pyx":231
- * cdef DTYPE_t[:, ::1] grad_X = np.empty((M, N), dtype=DTYPE)
- * grad(X_in, M, N, grad_X)
- * cdef DTYPE_t[:, ::1] grad_G = np.empty((M, N), dtype=DTYPE) # <<<<<<<<<<<<<<
- * grad(G_in, M, N, grad_G)
- * # cdef DTYPE_t[:, ::1] grad_X = np.gradient(X_in, axis=-1)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_grad_G = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":232
- * grad(X_in, M, N, grad_X)
- * cdef DTYPE_t[:, ::1] grad_G = np.empty((M, N), dtype=DTYPE)
- * grad(G_in, M, N, grad_G) # <<<<<<<<<<<<<<
- * # cdef DTYPE_t[:, ::1] grad_X = np.gradient(X_in, axis=-1)
- * # cdef DTYPE_t[:, ::1] grad_G = np.gradient(G_in, axis=-1)
- */
- __pyx_f_21false_color_filtering_13filter_cython_grad(__pyx_v_G_in, __pyx_v_M, __pyx_v_N, __pyx_v_grad_G);
-
- /* "false_color_filtering/filter_cython.pyx":236
- * # cdef DTYPE_t[:, ::1] grad_G = np.gradient(G_in, axis=-1)
- *
- * cdef DTYPE_t[:, ::1] X_TImax = np.empty((M, LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] X_TImin = np.empty((M,LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_TI = np.empty((M, LL), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_TImax = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":237
- *
- * cdef DTYPE_t[:, ::1] X_TImax = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_TImin = np.empty((M,LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] X_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_pf = np.empty((M, LL), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_TImin = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":238
- * cdef DTYPE_t[:, ::1] X_TImax = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_TImin = np.empty((M,LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_TI = np.empty((M, LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] X_pf = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_TI = np.empty((M, LL), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_TI = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":239
- * cdef DTYPE_t[:, ::1] X_TImin = np.empty((M,LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_pf = np.empty((M, LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] K_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] W_K = np.empty((M, LL), dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_pf = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":240
- * cdef DTYPE_t[:, ::1] X_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] X_pf = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_TI = np.empty((M, LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] W_K = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[::1] W_K_sum = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 240, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_K_TI = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":241
- * cdef DTYPE_t[:, ::1] X_pf = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] K_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] W_K = np.empty((M, LL), dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] W_K_sum = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emax = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_W_K = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":242
- * cdef DTYPE_t[:, ::1] K_TI = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[:, ::1] W_K = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[::1] W_K_sum = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Emax = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_W_K_sum = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":243
- * cdef DTYPE_t[:, ::1] W_K = np.empty((M, LL), dtype=DTYPE)
- * cdef DTYPE_t[::1] W_K_sum = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emax = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Emin = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 243, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_X_Emax = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":244
- * cdef DTYPE_t[::1] W_K_sum = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emax = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmax = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 244, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_Emin = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":245
- * cdef DTYPE_t[::1] X_Emax = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmin = np.empty(M, dtype=DTYPE)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_X_Wmax = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":246
- * cdef DTYPE_t[::1] X_Emin = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * # for i in range(L, M - L, 1):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_X_Wmin = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":249
- *
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, N - L, 1):
- * W_K_sum[i] = 0
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_7 = __pyx_v_L;
- __pyx_t_8 = (__pyx_v_M - __pyx_v_L);
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_10 = (__pyx_t_8 - __pyx_t_7 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_10 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_27, __pyx_t_28, __pyx_t_29, __pyx_t_30)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j) lastprivate(__pyx_v_l)
- #endif /* _OPENMP */
- for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_10; __pyx_t_9++){
- {
- __pyx_v_i = (Py_ssize_t)(__pyx_t_7 + 1 * __pyx_t_9);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
- __pyx_v_l = ((int)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":250
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True):
- * for j in range(L, N - L, 1): # <<<<<<<<<<<<<<
- * W_K_sum[i] = 0
- * X_Emax[i] = X_in[i, j]
- */
- __pyx_t_11 = (__pyx_v_N - __pyx_v_L);
- __pyx_t_12 = __pyx_t_11;
- for (__pyx_t_13 = __pyx_v_L; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
- __pyx_v_j = __pyx_t_13;
-
- /* "false_color_filtering/filter_cython.pyx":251
- * for i in prange(L, M - L, 1, nogil=True):
- * for j in range(L, N - L, 1):
- * W_K_sum[i] = 0 # <<<<<<<<<<<<<<
- * X_Emax[i] = X_in[i, j]
- * X_Emin[i] = X_in[i, j]
- */
- __pyx_t_14 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_W_K_sum.data) + __pyx_t_14)) )) = 0.0;
-
- /* "false_color_filtering/filter_cython.pyx":252
- * for j in range(L, N - L, 1):
- * W_K_sum[i] = 0
- * X_Emax[i] = X_in[i, j] # <<<<<<<<<<<<<<
- * X_Emin[i] = X_in[i, j]
- * X_Wmax[i] = X_in[i, j]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_14 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":253
- * W_K_sum[i] = 0
- * X_Emax[i] = X_in[i, j]
- * X_Emin[i] = X_in[i, j] # <<<<<<<<<<<<<<
- * X_Wmax[i] = X_in[i, j]
- * X_Wmin[i] = X_in[i, j]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_15 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":254
- * X_Emax[i] = X_in[i, j]
- * X_Emin[i] = X_in[i, j]
- * X_Wmax[i] = X_in[i, j] # <<<<<<<<<<<<<<
- * X_Wmin[i] = X_in[i, j]
- *
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_14 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":255
- * X_Emin[i] = X_in[i, j]
- * X_Wmax[i] = X_in[i, j]
- * X_Wmin[i] = X_in[i, j] # <<<<<<<<<<<<<<
- *
- * ###### Transient improvement filtering
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_15 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":259
- * ###### Transient improvement filtering
- * ## Compute min and max on windows (Eq. (2)) (do it the recursive way)
- * for l in range(0, L, 1): # <<<<<<<<<<<<<<
- * if X_in[i, j + l + 1] > X_Emax[i]:
- * X_Emax[i] = X_in[i, j + l + 1]
- */
- __pyx_t_17 = __pyx_v_L;
- __pyx_t_18 = __pyx_t_17;
- for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
- __pyx_v_l = __pyx_t_19;
-
- /* "false_color_filtering/filter_cython.pyx":260
- * ## Compute min and max on windows (Eq. (2)) (do it the recursive way)
- * for l in range(0, L, 1):
- * if X_in[i, j + l + 1] > X_Emax[i]: # <<<<<<<<<<<<<<
- * X_Emax[i] = X_in[i, j + l + 1]
- * if X_in[i, j + l + 1] < X_Emin[i]:
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_14 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) ))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax.data) + __pyx_t_16)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":261
- * for l in range(0, L, 1):
- * if X_in[i, j + l + 1] > X_Emax[i]:
- * X_Emax[i] = X_in[i, j + l + 1] # <<<<<<<<<<<<<<
- * if X_in[i, j + l + 1] < X_Emin[i]:
- * X_Emin[i] = X_in[i, j + l + 1]
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_14 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax.data) + __pyx_t_14)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_16 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":260
- * ## Compute min and max on windows (Eq. (2)) (do it the recursive way)
- * for l in range(0, L, 1):
- * if X_in[i, j + l + 1] > X_Emax[i]: # <<<<<<<<<<<<<<
- * X_Emax[i] = X_in[i, j + l + 1]
- * if X_in[i, j + l + 1] < X_Emin[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":262
- * if X_in[i, j + l + 1] > X_Emax[i]:
- * X_Emax[i] = X_in[i, j + l + 1]
- * if X_in[i, j + l + 1] < X_Emin[i]: # <<<<<<<<<<<<<<
- * X_Emin[i] = X_in[i, j + l + 1]
- * if X_in[i, j - L + l] > X_Wmax[i]:
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_15 * __pyx_v_X_in.strides[0]) )) + __pyx_t_16)) ))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin.data) + __pyx_t_14)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":263
- * X_Emax[i] = X_in[i, j + l + 1]
- * if X_in[i, j + l + 1] < X_Emin[i]:
- * X_Emin[i] = X_in[i, j + l + 1] # <<<<<<<<<<<<<<
- * if X_in[i, j - L + l] > X_Wmax[i]:
- * X_Wmax[i] = X_in[i, j - L + l]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_15 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin.data) + __pyx_t_15)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_14 * __pyx_v_X_in.strides[0]) )) + __pyx_t_16)) )));
-
- /* "false_color_filtering/filter_cython.pyx":262
- * if X_in[i, j + l + 1] > X_Emax[i]:
- * X_Emax[i] = X_in[i, j + l + 1]
- * if X_in[i, j + l + 1] < X_Emin[i]: # <<<<<<<<<<<<<<
- * X_Emin[i] = X_in[i, j + l + 1]
- * if X_in[i, j - L + l] > X_Wmax[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":264
- * if X_in[i, j + l + 1] < X_Emin[i]:
- * X_Emin[i] = X_in[i, j + l + 1]
- * if X_in[i, j - L + l] > X_Wmax[i]: # <<<<<<<<<<<<<<
- * X_Wmax[i] = X_in[i, j - L + l]
- * if X_in[i, j - L + l] < X_Wmin[i]:
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_16 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) ))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax.data) + __pyx_t_15)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":265
- * X_Emin[i] = X_in[i, j + l + 1]
- * if X_in[i, j - L + l] > X_Wmax[i]:
- * X_Wmax[i] = X_in[i, j - L + l] # <<<<<<<<<<<<<<
- * if X_in[i, j - L + l] < X_Wmin[i]:
- * X_Wmin[i] = X_in[i, j - L + l]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_15 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":264
- * if X_in[i, j + l + 1] < X_Emin[i]:
- * X_Emin[i] = X_in[i, j + l + 1]
- * if X_in[i, j - L + l] > X_Wmax[i]: # <<<<<<<<<<<<<<
- * X_Wmax[i] = X_in[i, j - L + l]
- * if X_in[i, j - L + l] < X_Wmin[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":266
- * if X_in[i, j - L + l] > X_Wmax[i]:
- * X_Wmax[i] = X_in[i, j - L + l]
- * if X_in[i, j - L + l] < X_Wmin[i]: # <<<<<<<<<<<<<<
- * X_Wmin[i] = X_in[i, j - L + l]
- *
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_14 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) ))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin.data) + __pyx_t_16)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":267
- * X_Wmax[i] = X_in[i, j - L + l]
- * if X_in[i, j - L + l] < X_Wmin[i]:
- * X_Wmin[i] = X_in[i, j - L + l] # <<<<<<<<<<<<<<
- *
- * ## Select the best couple of values (Eq. (3))
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_14 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin.data) + __pyx_t_14)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_16 * __pyx_v_X_in.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":266
- * if X_in[i, j - L + l] > X_Wmax[i]:
- * X_Wmax[i] = X_in[i, j - L + l]
- * if X_in[i, j - L + l] < X_Wmin[i]: # <<<<<<<<<<<<<<
- * X_Wmin[i] = X_in[i, j - L + l]
- *
- */
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":270
- *
- * ## Select the best couple of values (Eq. (3))
- * if (X_Emax[i] - X_Wmin[i]) >= (X_Wmax[i] - X_Emin[i]): # <<<<<<<<<<<<<<
- * X_max[i, j] = X_Emax[i]
- * X_min[i, j] = X_Wmin[i]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_20 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax.data) + __pyx_t_15)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin.data) + __pyx_t_16)) )))) >= ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax.data) + __pyx_t_14)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin.data) + __pyx_t_21)) ))))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":271
- * ## Select the best couple of values (Eq. (3))
- * if (X_Emax[i] - X_Wmin[i]) >= (X_Wmax[i] - X_Emin[i]):
- * X_max[i, j] = X_Emax[i] # <<<<<<<<<<<<<<
- * X_min[i, j] = X_Wmin[i]
- * else:
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_14 * __pyx_v_X_max.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax.data) + __pyx_t_21)) )));
-
- /* "false_color_filtering/filter_cython.pyx":272
- * if (X_Emax[i] - X_Wmin[i]) >= (X_Wmax[i] - X_Emin[i]):
- * X_max[i, j] = X_Emax[i]
- * X_min[i, j] = X_Wmin[i] # <<<<<<<<<<<<<<
- * else:
- * X_max[i, j] = X_Wmax[i]
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_16 * __pyx_v_X_min.strides[0]) )) + __pyx_t_14)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin.data) + __pyx_t_21)) )));
-
- /* "false_color_filtering/filter_cython.pyx":270
- *
- * ## Select the best couple of values (Eq. (3))
- * if (X_Emax[i] - X_Wmin[i]) >= (X_Wmax[i] - X_Emin[i]): # <<<<<<<<<<<<<<
- * X_max[i, j] = X_Emax[i]
- * X_min[i, j] = X_Wmin[i]
- */
- goto __pyx_L18;
- }
-
- /* "false_color_filtering/filter_cython.pyx":274
- * X_min[i, j] = X_Wmin[i]
- * else:
- * X_max[i, j] = X_Wmax[i] # <<<<<<<<<<<<<<
- * X_min[i, j] = X_Emin[i]
- *
- */
- /*else*/ {
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_14 * __pyx_v_X_max.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax.data) + __pyx_t_21)) )));
-
- /* "false_color_filtering/filter_cython.pyx":275
- * else:
- * X_max[i, j] = X_Wmax[i]
- * X_min[i, j] = X_Emin[i] # <<<<<<<<<<<<<<
- *
- * for l in range(0, LL, 1):
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_16 * __pyx_v_X_min.strides[0]) )) + __pyx_t_14)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin.data) + __pyx_t_21)) )));
- }
- __pyx_L18:;
-
- /* "false_color_filtering/filter_cython.pyx":277
- * X_min[i, j] = X_Emin[i]
- *
- * for l in range(0, LL, 1): # <<<<<<<<<<<<<<
- * ## Main TI process (Eq. (1)) and Eq. (4)) (we use X_TI for X_pf as they are the same thing)
- * if X_in[i, j] > G_in[i, j]:
- */
- __pyx_t_17 = __pyx_v_LL;
- __pyx_t_18 = __pyx_t_17;
- for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
- __pyx_v_l = __pyx_t_19;
-
- /* "false_color_filtering/filter_cython.pyx":279
- * for l in range(0, LL, 1):
- * ## Main TI process (Eq. (1)) and Eq. (4)) (we use X_TI for X_pf as they are the same thing)
- * if X_in[i, j] > G_in[i, j]: # <<<<<<<<<<<<<<
- * X_pf[i, l] = rho[0] * X_max[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_min[i, j]
- * X_TImax[i, l] = X_in[i, j + l - L]
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_21 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) ))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_16 * __pyx_v_G_in.strides[0]) )) + __pyx_t_15)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":280
- * ## Main TI process (Eq. (1)) and Eq. (4)) (we use X_TI for X_pf as they are the same thing)
- * if X_in[i, j] > G_in[i, j]:
- * X_pf[i, l] = rho[0] * X_max[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_min[i, j] # <<<<<<<<<<<<<<
- * X_TImax[i, l] = X_in[i, j + l - L]
- * X_TImin[i, l] = fmax(X_min[i, j], G_in[i, j + l - L])
- */
- __pyx_t_15 = 0;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_21 = 1;
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_23 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_24 = 2;
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_j;
- __pyx_t_27 = __pyx_v_i;
- __pyx_t_28 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_pf.data + __pyx_t_27 * __pyx_v_X_pf.strides[0]) )) + __pyx_t_28)) )) = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_15)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_16 * __pyx_v_X_max.strides[0]) )) + __pyx_t_14)) )))) + ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_21)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_22 * __pyx_v_X_in.strides[0]) )) + __pyx_t_23)) ))))) + ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_24)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_25 * __pyx_v_X_min.strides[0]) )) + __pyx_t_26)) )))));
-
- /* "false_color_filtering/filter_cython.pyx":281
- * if X_in[i, j] > G_in[i, j]:
- * X_pf[i, l] = rho[0] * X_max[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_min[i, j]
- * X_TImax[i, l] = X_in[i, j + l - L] # <<<<<<<<<<<<<<
- * X_TImin[i, l] = fmax(X_min[i, j], G_in[i, j + l - L])
- * else:
- */
- __pyx_t_26 = __pyx_v_i;
- __pyx_t_25 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_24 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImax.data + __pyx_t_24 * __pyx_v_X_TImax.strides[0]) )) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_26 * __pyx_v_X_in.strides[0]) )) + __pyx_t_25)) )));
-
- /* "false_color_filtering/filter_cython.pyx":282
- * X_pf[i, l] = rho[0] * X_max[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_min[i, j]
- * X_TImax[i, l] = X_in[i, j + l - L]
- * X_TImin[i, l] = fmax(X_min[i, j], G_in[i, j + l - L]) # <<<<<<<<<<<<<<
- * else:
- * X_pf[i, l] = rho[0] * X_min[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_max[i, j]
- */
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_j;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_24 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImin.data + __pyx_t_22 * __pyx_v_X_TImin.strides[0]) )) + __pyx_t_21)) )) = fmax((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_25 * __pyx_v_X_min.strides[0]) )) + __pyx_t_26)) ))), (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_23 * __pyx_v_G_in.strides[0]) )) + __pyx_t_24)) ))));
-
- /* "false_color_filtering/filter_cython.pyx":279
- * for l in range(0, LL, 1):
- * ## Main TI process (Eq. (1)) and Eq. (4)) (we use X_TI for X_pf as they are the same thing)
- * if X_in[i, j] > G_in[i, j]: # <<<<<<<<<<<<<<
- * X_pf[i, l] = rho[0] * X_max[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_min[i, j]
- * X_TImax[i, l] = X_in[i, j + l - L]
- */
- goto __pyx_L21;
- }
-
- /* "false_color_filtering/filter_cython.pyx":284
- * X_TImin[i, l] = fmax(X_min[i, j], G_in[i, j + l - L])
- * else:
- * X_pf[i, l] = rho[0] * X_min[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_max[i, j] # <<<<<<<<<<<<<<
- * X_TImax[i, l] = fmin(X_max[i, j], G_in[i, j + l - L])
- * X_TImin[i, l] = X_in[i, j + l - L]
- */
- /*else*/ {
- __pyx_t_24 = 0;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_j;
- __pyx_t_25 = 1;
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_14 = 2;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_28 = __pyx_v_i;
- __pyx_t_27 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_pf.data + __pyx_t_28 * __pyx_v_X_pf.strides[0]) )) + __pyx_t_27)) )) = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_24)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_23 * __pyx_v_X_min.strides[0]) )) + __pyx_t_26)) )))) + ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_25)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_21 * __pyx_v_X_in.strides[0]) )) + __pyx_t_22)) ))))) + ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_rho.data) + __pyx_t_14)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_16 * __pyx_v_X_max.strides[0]) )) + __pyx_t_15)) )))));
-
- /* "false_color_filtering/filter_cython.pyx":285
- * else:
- * X_pf[i, l] = rho[0] * X_min[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_max[i, j]
- * X_TImax[i, l] = fmin(X_max[i, j], G_in[i, j + l - L]) # <<<<<<<<<<<<<<
- * X_TImin[i, l] = X_in[i, j + l - L]
- *
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_25 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImax.data + __pyx_t_21 * __pyx_v_X_TImax.strides[0]) )) + __pyx_t_25)) )) = fmin((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_15 * __pyx_v_X_max.strides[0]) )) + __pyx_t_16)) ))), (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_14 * __pyx_v_G_in.strides[0]) )) + __pyx_t_22)) ))));
-
- /* "false_color_filtering/filter_cython.pyx":286
- * X_pf[i, l] = rho[0] * X_min[i, j] + rho[1] * X_in[i, j + l - L] + rho[2] * X_max[i, j]
- * X_TImax[i, l] = fmin(X_max[i, j], G_in[i, j + l - L])
- * X_TImin[i, l] = X_in[i, j + l - L] # <<<<<<<<<<<<<<
- *
- * ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- */
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImin.data + __pyx_t_16 * __pyx_v_X_TImin.strides[0]) )) + __pyx_t_15)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_in.data + __pyx_t_22 * __pyx_v_X_in.strides[0]) )) + __pyx_t_14)) )));
- }
- __pyx_L21:;
-
- /* "false_color_filtering/filter_cython.pyx":289
- *
- * ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- * if X_pf[i, l] > X_TImax[i, l]: # <<<<<<<<<<<<<<
- * X_TI[i, l] = X_TImax[i, l]
- * elif X_pf[i, l] < X_TImin[i, l]:
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_l;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_l;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_pf.data + __pyx_t_14 * __pyx_v_X_pf.strides[0]) )) + __pyx_t_22)) ))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImax.data + __pyx_t_15 * __pyx_v_X_TImax.strides[0]) )) + __pyx_t_16)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":290
- * ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- * if X_pf[i, l] > X_TImax[i, l]:
- * X_TI[i, l] = X_TImax[i, l] # <<<<<<<<<<<<<<
- * elif X_pf[i, l] < X_TImin[i, l]:
- * X_TI[i, l] = X_TImin[i, l]
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_l;
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TI.data + __pyx_t_22 * __pyx_v_X_TI.strides[0]) )) + __pyx_t_14)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImax.data + __pyx_t_16 * __pyx_v_X_TImax.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":289
- *
- * ## Clipping the filtered imaged in the admissible set on values (Eq. (5))
- * if X_pf[i, l] > X_TImax[i, l]: # <<<<<<<<<<<<<<
- * X_TI[i, l] = X_TImax[i, l]
- * elif X_pf[i, l] < X_TImin[i, l]:
- */
- goto __pyx_L22;
- }
-
- /* "false_color_filtering/filter_cython.pyx":291
- * if X_pf[i, l] > X_TImax[i, l]:
- * X_TI[i, l] = X_TImax[i, l]
- * elif X_pf[i, l] < X_TImin[i, l]: # <<<<<<<<<<<<<<
- * X_TI[i, l] = X_TImin[i, l]
- * else:
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_l;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_l;
- __pyx_t_20 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_pf.data + __pyx_t_15 * __pyx_v_X_pf.strides[0]) )) + __pyx_t_16)) ))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImin.data + __pyx_t_14 * __pyx_v_X_TImin.strides[0]) )) + __pyx_t_22)) )))) != 0);
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":292
- * X_TI[i, l] = X_TImax[i, l]
- * elif X_pf[i, l] < X_TImin[i, l]:
- * X_TI[i, l] = X_TImin[i, l] # <<<<<<<<<<<<<<
- * else:
- * X_TI[i, l] = X_pf[i, l]
- */
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_l;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TI.data + __pyx_t_16 * __pyx_v_X_TI.strides[0]) )) + __pyx_t_15)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TImin.data + __pyx_t_22 * __pyx_v_X_TImin.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":291
- * if X_pf[i, l] > X_TImax[i, l]:
- * X_TI[i, l] = X_TImax[i, l]
- * elif X_pf[i, l] < X_TImin[i, l]: # <<<<<<<<<<<<<<
- * X_TI[i, l] = X_TImin[i, l]
- * else:
- */
- goto __pyx_L22;
- }
-
- /* "false_color_filtering/filter_cython.pyx":294
- * X_TI[i, l] = X_TImin[i, l]
- * else:
- * X_TI[i, l] = X_pf[i, l] # <<<<<<<<<<<<<<
- *
- * # RGB2KbKr conversion (Eq. (7))
- */
- /*else*/ {
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_l;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TI.data + __pyx_t_15 * __pyx_v_X_TI.strides[0]) )) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_pf.data + __pyx_t_14 * __pyx_v_X_pf.strides[0]) )) + __pyx_t_22)) )));
- }
- __pyx_L22:;
-
- /* "false_color_filtering/filter_cython.pyx":297
- *
- * # RGB2KbKr conversion (Eq. (7))
- * K_TI[i, l] = X_TI[i, l] - G_in[i, j + l - L] # (2L+1) # <<<<<<<<<<<<<<
- *
- * ##### False color filtering
- */
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_l;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j + __pyx_v_l) - __pyx_v_L);
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_25 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_21)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_TI.data + __pyx_t_22 * __pyx_v_X_TI.strides[0]) )) + __pyx_t_14)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G_in.data + __pyx_t_16 * __pyx_v_G_in.strides[0]) )) + __pyx_t_15)) ))));
-
- /* "false_color_filtering/filter_cython.pyx":302
- * ## Computing W_K in Eq. (10)
- * ## Chromaticity sign (Eq. (11))
- * if (sign(K_TI[i, L]) == sign(K_TI[i, l])) or (fabs(K_TI[i, l]) < tau): # <<<<<<<<<<<<<<
- * W_K[i, l] = 1
- * else:
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_L;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_l;
- __pyx_t_29 = ((__pyx_f_21false_color_filtering_13filter_cython_sign((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_15 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_16)) )))) == __pyx_f_21false_color_filtering_13filter_cython_sign((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_14 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_22)) ))))) != 0);
- if (!__pyx_t_29) {
- } else {
- __pyx_t_20 = __pyx_t_29;
- goto __pyx_L24_bool_binop_done;
- }
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_l;
- __pyx_t_29 = ((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_22 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_14)) )))) < __pyx_v_tau) != 0);
- __pyx_t_20 = __pyx_t_29;
- __pyx_L24_bool_binop_done:;
- if (__pyx_t_20) {
-
- /* "false_color_filtering/filter_cython.pyx":303
- * ## Chromaticity sign (Eq. (11))
- * if (sign(K_TI[i, L]) == sign(K_TI[i, l])) or (fabs(K_TI[i, l]) < tau):
- * W_K[i, l] = 1 # <<<<<<<<<<<<<<
- * else:
- * W_K[i, l] = 0
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_W_K.data + __pyx_t_14 * __pyx_v_W_K.strides[0]) )) + __pyx_t_22)) )) = 1.0;
-
- /* "false_color_filtering/filter_cython.pyx":302
- * ## Computing W_K in Eq. (10)
- * ## Chromaticity sign (Eq. (11))
- * if (sign(K_TI[i, L]) == sign(K_TI[i, l])) or (fabs(K_TI[i, l]) < tau): # <<<<<<<<<<<<<<
- * W_K[i, l] = 1
- * else:
- */
- goto __pyx_L23;
- }
-
- /* "false_color_filtering/filter_cython.pyx":305
- * W_K[i, l] = 1
- * else:
- * W_K[i, l] = 0 # <<<<<<<<<<<<<<
- *
- * ## Gradients' weights (Eq. (12))
- */
- /*else*/ {
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_W_K.data + __pyx_t_22 * __pyx_v_W_K.strides[0]) )) + __pyx_t_14)) )) = 0.0;
- }
- __pyx_L23:;
-
- /* "false_color_filtering/filter_cython.pyx":308
- *
- * ## Gradients' weights (Eq. (12))
- * W_K[i, l] /= fabs(grad_G[i, j + l]) + \ # <<<<<<<<<<<<<<
- * fmax(fabs(grad_X[i, j + l]), alpha_X * fabs(K_TI[i, l])) + \
- * fabs(Y_in[i, j] - Y_in[i, j + l]) + eps
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_22 = (__pyx_v_j + __pyx_v_l);
-
- /* "false_color_filtering/filter_cython.pyx":309
- * ## Gradients' weights (Eq. (12))
- * W_K[i, l] /= fabs(grad_G[i, j + l]) + \
- * fmax(fabs(grad_X[i, j + l]), alpha_X * fabs(K_TI[i, l])) + \ # <<<<<<<<<<<<<<
- * fabs(Y_in[i, j] - Y_in[i, j + l]) + eps
- *
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_25 = __pyx_v_l;
-
- /* "false_color_filtering/filter_cython.pyx":310
- * W_K[i, l] /= fabs(grad_G[i, j + l]) + \
- * fmax(fabs(grad_X[i, j + l]), alpha_X * fabs(K_TI[i, l])) + \
- * fabs(Y_in[i, j] - Y_in[i, j + l]) + eps # <<<<<<<<<<<<<<
- *
- * ## Linear filtering with clipping (Eqs. (9) and (10))
- */
- __pyx_t_26 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_24 = __pyx_v_i;
- __pyx_t_27 = (__pyx_v_j + __pyx_v_l);
-
- /* "false_color_filtering/filter_cython.pyx":308
- *
- * ## Gradients' weights (Eq. (12))
- * W_K[i, l] /= fabs(grad_G[i, j + l]) + \ # <<<<<<<<<<<<<<
- * fmax(fabs(grad_X[i, j + l]), alpha_X * fabs(K_TI[i, l])) + \
- * fabs(Y_in[i, j] - Y_in[i, j + l]) + eps
- */
- __pyx_t_28 = __pyx_v_i;
- __pyx_t_30 = __pyx_v_l;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_W_K.data + __pyx_t_28 * __pyx_v_W_K.strides[0]) )) + __pyx_t_30)) )) /= (((fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_grad_G.data + __pyx_t_14 * __pyx_v_grad_G.strides[0]) )) + __pyx_t_22)) )))) + fmax(fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_grad_X.data + __pyx_t_16 * __pyx_v_grad_X.strides[0]) )) + __pyx_t_15)) )))), (__pyx_v_alpha_X * fabs((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_21 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_25)) ))))))) + fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Y_in.data + __pyx_t_26 * __pyx_v_Y_in.strides[0]) )) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Y_in.data + __pyx_t_24 * __pyx_v_Y_in.strides[0]) )) + __pyx_t_27)) )))))) + __pyx_v_eps);
-
- /* "false_color_filtering/filter_cython.pyx":315
- * # K_hor[i, j] = K_hor[i, j] + W_K[i, l] * clip(K_TI[i, l], K_TI[i, L])
- * # W_K_sum[i] = W_K_sum[i] + W_K[i, l]
- * K_hor[i, j] += W_K[i, l] * clip(K_TI[i, l], K_TI[i, L]) # <<<<<<<<<<<<<<
- * W_K_sum[i] += W_K[i, l]
- *
- */
- __pyx_t_27 = __pyx_v_i;
- __pyx_t_24 = __pyx_v_l;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_l;
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_L;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_hor.data + __pyx_t_15 * __pyx_v_K_hor.strides[0]) )) + __pyx_t_16)) )) += ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_W_K.data + __pyx_t_27 * __pyx_v_W_K.strides[0]) )) + __pyx_t_24)) ))) * __pyx_f_21false_color_filtering_13filter_cython_clip((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_23 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_26)) ))), (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_25 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_21)) )))));
-
- /* "false_color_filtering/filter_cython.pyx":316
- * # W_K_sum[i] = W_K_sum[i] + W_K[i, l]
- * K_hor[i, j] += W_K[i, l] * clip(K_TI[i, l], K_TI[i, L])
- * W_K_sum[i] += W_K[i, l] # <<<<<<<<<<<<<<
- *
- * ## Linear filtering (Eqs. (9))
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_25 = __pyx_v_l;
- __pyx_t_26 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_W_K_sum.data) + __pyx_t_26)) )) += (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_W_K.data + __pyx_t_21 * __pyx_v_W_K.strides[0]) )) + __pyx_t_25)) )));
- }
-
- /* "false_color_filtering/filter_cython.pyx":319
- *
- * ## Linear filtering (Eqs. (9))
- * K_hor[i, j] /= W_K_sum[i] + eps # <<<<<<<<<<<<<<
- *
- * ## Save K_TI for arbitration
- */
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_hor.data + __pyx_t_21 * __pyx_v_K_hor.strides[0]) )) + __pyx_t_26)) )) /= ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_W_K_sum.data) + __pyx_t_25)) ))) + __pyx_v_eps);
-
- /* "false_color_filtering/filter_cython.pyx":322
- *
- * ## Save K_TI for arbitration
- * K_TI_hor[i, j] = K_TI[i, L] # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_25 = __pyx_v_i;
- __pyx_t_26 = __pyx_v_L;
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI_hor.data + __pyx_t_21 * __pyx_v_K_TI_hor.strides[0]) )) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_25 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_26)) )));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":249
- *
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, N - L, 1):
- * W_K_sum[i] = 0
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":216
- * @cython.nonecheck(False)
- * @cython.cdivision(True)
- * cdef void ti_and_ca_filtering1D(DTYPE_t[:, ::1] X_in, DTYPE_t[:, ::1] G_in, DTYPE_t[:, ::1] Y_in, int L, # <<<<<<<<<<<<<<
- * DTYPE_t[::1] rho, DTYPE_t alpha_X, DTYPE_t tau, DTYPE_t[:, ::1] K_hor,
- * DTYPE_t[:, ::1] K_TI_hor, DTYPE_t[:, ::1] X_max, DTYPE_t[:, ::1] X_min):
- */
-
- /* function exit code */
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
- __Pyx_WriteUnraisable("false_color_filtering.filter_cython.ti_and_ca_filtering1D", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
- __pyx_L0:;
- __PYX_XDEC_MEMVIEW(&__pyx_v_grad_X, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_grad_G, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_TImax, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_TImin, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_TI, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_pf, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_K_TI, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_W_K, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_W_K_sum, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emax, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emin, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmax, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmin, 1);
- __Pyx_RefNannyFinishContext();
-}
-
-/* "false_color_filtering/filter_cython.pyx":329
- * @cython.nonecheck(False)
- * @cython.cdivision(True)
- * cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] G, DTYPE_t[:, ::1] X_max, # <<<<<<<<<<<<<<
- * DTYPE_t[:, ::1] X_min, DTYPE_t beta_X, int L_hor, int L_ver, DTYPE_t gamma_1,
- * DTYPE_t gamma_2, DTYPE_t[:, ::1] K_out):
- */
-
-static void __pyx_f_21false_color_filtering_13filter_cython_arbitration(__Pyx_memviewslice __pyx_v_K, __Pyx_memviewslice __pyx_v_K_TI, __Pyx_memviewslice __pyx_v_X, __Pyx_memviewslice __pyx_v_G, __Pyx_memviewslice __pyx_v_X_max, __Pyx_memviewslice __pyx_v_X_min, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_beta_X, int __pyx_v_L_hor, int __pyx_v_L_ver, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_1, __pyx_t_21false_color_filtering_13filter_cython_DTYPE_t __pyx_v_gamma_2, __Pyx_memviewslice __pyx_v_K_out) {
- Py_ssize_t __pyx_v_M;
- Py_ssize_t __pyx_v_N;
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_j;
- int __pyx_v_l;
- int __pyx_v_L;
- __Pyx_memviewslice __pyx_v_X_contrast_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Xp_max_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Xp_min_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emax_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emin_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmax_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmin_hor = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_contrast_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Xp_max_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Xp_min_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emax_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Emin_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmax_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_Wmin_ver = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Xt = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_Gt = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_X_contrast = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_alpha_K = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
- int __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- Py_ssize_t __pyx_t_12;
- Py_ssize_t __pyx_t_13;
- Py_ssize_t __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- Py_ssize_t __pyx_t_16;
- int __pyx_t_17;
- int __pyx_t_18;
- int __pyx_t_19;
- Py_ssize_t __pyx_t_20;
- Py_ssize_t __pyx_t_21;
- Py_ssize_t __pyx_t_22;
- Py_ssize_t __pyx_t_23;
- int __pyx_t_24;
- Py_ssize_t __pyx_t_25;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("arbitration", 0);
-
- /* "false_color_filtering/filter_cython.pyx":334
- *
- * cdef Py_ssize_t M, N, i, j
- * cdef int l = 0 # <<<<<<<<<<<<<<
- * M = X.shape[0]
- * N = X.shape[1]
- */
- __pyx_v_l = 0;
-
- /* "false_color_filtering/filter_cython.pyx":335
- * cdef Py_ssize_t M, N, i, j
- * cdef int l = 0
- * M = X.shape[0] # <<<<<<<<<<<<<<
- * N = X.shape[1]
- *
- */
- __pyx_v_M = (__pyx_v_X.shape[0]);
-
- /* "false_color_filtering/filter_cython.pyx":336
- * cdef int l = 0
- * M = X.shape[0]
- * N = X.shape[1] # <<<<<<<<<<<<<<
- *
- * cdef int L = L_hor
- */
- __pyx_v_N = (__pyx_v_X.shape[1]);
-
- /* "false_color_filtering/filter_cython.pyx":338
- * N = X.shape[1]
- *
- * cdef int L = L_hor # <<<<<<<<<<<<<<
- *
- * ## Compute the Contrast images (Eq. (20))
- */
- __pyx_v_L = __pyx_v_L_hor;
-
- /* "false_color_filtering/filter_cython.pyx":341
- *
- * ## Compute the Contrast images (Eq. (20))
- * cdef DTYPE_t[:, ::1] X_contrast_hor = np.empty((M, N), dtype=DTYPE) # (M, N), horizontal pass # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] Xp_max_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] Xp_min_hor = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 341, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_contrast_hor = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":342
- * ## Compute the Contrast images (Eq. (20))
- * cdef DTYPE_t[:, ::1] X_contrast_hor = np.empty((M, N), dtype=DTYPE) # (M, N), horizontal pass
- * cdef DTYPE_t[::1] Xp_max_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] Xp_min_hor = np.empty(M, dtype=DTYPE)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_Xp_max_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":343
- * cdef DTYPE_t[:, ::1] X_contrast_hor = np.empty((M, N), dtype=DTYPE) # (M, N), horizontal pass
- * cdef DTYPE_t[::1] Xp_max_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] Xp_min_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * cdef DTYPE_t[::1] X_Emax_hor = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 343, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_Xp_min_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":345
- * cdef DTYPE_t[::1] Xp_min_hor = np.empty(M, dtype=DTYPE)
- *
- * cdef DTYPE_t[::1] X_Emax_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Emin_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_hor = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_Emax_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":346
- *
- * cdef DTYPE_t[::1] X_Emax_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmax_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin_hor = np.empty(M, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_X_Emin_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":347
- * cdef DTYPE_t[::1] X_Emax_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmin_hor = np.empty(M, dtype=DTYPE)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 347, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_X_Wmax_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":348
- * cdef DTYPE_t[::1] X_Emin_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_hor = np.empty(M, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin_hor = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * # for i in range(L, M - L, 1):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_Wmin_hor = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":351
- *
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, N - L, 1):
- * X_Emax_hor[i] = X[i, j]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_7 = __pyx_v_L;
- __pyx_t_8 = (__pyx_v_M - __pyx_v_L);
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_10 = (__pyx_t_8 - __pyx_t_7 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_10 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j) lastprivate(__pyx_v_l)
- #endif /* _OPENMP */
- for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_10; __pyx_t_9++){
- {
- __pyx_v_i = (Py_ssize_t)(__pyx_t_7 + 1 * __pyx_t_9);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
- __pyx_v_l = ((int)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":352
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True):
- * for j in range(L, N - L, 1): # <<<<<<<<<<<<<<
- * X_Emax_hor[i] = X[i, j]
- * X_Emin_hor[i] = X[i, j]
- */
- __pyx_t_11 = (__pyx_v_N - __pyx_v_L);
- __pyx_t_12 = __pyx_t_11;
- for (__pyx_t_13 = __pyx_v_L; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
- __pyx_v_j = __pyx_t_13;
-
- /* "false_color_filtering/filter_cython.pyx":353
- * for i in prange(L, M - L, 1, nogil=True):
- * for j in range(L, N - L, 1):
- * X_Emax_hor[i] = X[i, j] # <<<<<<<<<<<<<<
- * X_Emin_hor[i] = X[i, j]
- * X_Wmax_hor[i] = X[i, j]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_hor.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_14 * __pyx_v_X.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":354
- * for j in range(L, N - L, 1):
- * X_Emax_hor[i] = X[i, j]
- * X_Emin_hor[i] = X[i, j] # <<<<<<<<<<<<<<
- * X_Wmax_hor[i] = X[i, j]
- * X_Wmin_hor[i] = X[i, j]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_hor.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_15 * __pyx_v_X.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":355
- * X_Emax_hor[i] = X[i, j]
- * X_Emin_hor[i] = X[i, j]
- * X_Wmax_hor[i] = X[i, j] # <<<<<<<<<<<<<<
- * X_Wmin_hor[i] = X[i, j]
- *
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_hor.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_14 * __pyx_v_X.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":356
- * X_Emin_hor[i] = X[i, j]
- * X_Wmax_hor[i] = X[i, j]
- * X_Wmin_hor[i] = X[i, j] # <<<<<<<<<<<<<<
- *
- * ## Recompute updated local max and min (Eq .(19))
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_hor.data) + __pyx_t_16)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_15 * __pyx_v_X.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":359
- *
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1): # <<<<<<<<<<<<<<
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]:
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- */
- __pyx_t_17 = __pyx_v_L;
- __pyx_t_18 = __pyx_t_17;
- for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
- __pyx_v_l = __pyx_t_19;
-
- /* "false_color_filtering/filter_cython.pyx":360
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1):
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]: # <<<<<<<<<<<<<<
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_14 * __pyx_v_X.strides[0]) )) + __pyx_t_15)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_16 * __pyx_v_X.strides[0]) )) + __pyx_t_20)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_21 * __pyx_v_G.strides[0]) )) + __pyx_t_22)) ))))))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_hor.data) + __pyx_t_23)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":361
- * for l in range(0, L, 1):
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]:
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l]) # <<<<<<<<<<<<<<
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_22 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_20 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_14 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_hor.data) + __pyx_t_14)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_23 * __pyx_v_X.strides[0]) )) + __pyx_t_22)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_21 * __pyx_v_X.strides[0]) )) + __pyx_t_20)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_16 * __pyx_v_G.strides[0]) )) + __pyx_t_15)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":360
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1):
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]: # <<<<<<<<<<<<<<
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":362
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]:
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]: # <<<<<<<<<<<<<<
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_21 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_23 = (__pyx_v_L + __pyx_v_l);
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_15 * __pyx_v_X.strides[0]) )) + __pyx_t_16)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_20 * __pyx_v_X.strides[0]) )) + __pyx_t_21)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_22 * __pyx_v_G.strides[0]) )) + __pyx_t_23)) ))))))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_hor.data) + __pyx_t_14)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":363
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l]) # <<<<<<<<<<<<<<
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_21 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_16 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_15 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_hor.data) + __pyx_t_15)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_14 * __pyx_v_X.strides[0]) )) + __pyx_t_23)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_22 * __pyx_v_X.strides[0]) )) + __pyx_t_21)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_20 * __pyx_v_G.strides[0]) )) + __pyx_t_16)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":362
- * if (X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])) > X_Emax_hor[i]:
- * X_Emax_hor[i] = X[i, j + l] - beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]: # <<<<<<<<<<<<<<
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":364
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]: # <<<<<<<<<<<<<<
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]:
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_16 * __pyx_v_X.strides[0]) )) + __pyx_t_20)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_21 * __pyx_v_X.strides[0]) )) + __pyx_t_22)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_23 * __pyx_v_G.strides[0]) )) + __pyx_t_14)) ))))))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_hor.data) + __pyx_t_15)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":365
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1]) # <<<<<<<<<<<<<<
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]:
- * X_Wmin_hor[i] = X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_14 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_22 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_20 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_16 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_hor.data) + __pyx_t_16)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_15 * __pyx_v_X.strides[0]) )) + __pyx_t_14)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_23 * __pyx_v_X.strides[0]) )) + __pyx_t_22)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_21 * __pyx_v_G.strides[0]) )) + __pyx_t_20)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":364
- * if (X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, L + l])) < X_Emin_hor[i]:
- * X_Emin_hor[i] = X[i, j + l] + beta_X * fabs(X[i, j + l] - G[i, j + l])
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]: # <<<<<<<<<<<<<<
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":366
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]: # <<<<<<<<<<<<<<
- * X_Wmin_hor[i] = X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- *
- */
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_21 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_23 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_15 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_20 * __pyx_v_X.strides[0]) )) + __pyx_t_21)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_22 * __pyx_v_X.strides[0]) )) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_14 * __pyx_v_G.strides[0]) )) + __pyx_t_15)) ))))))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_hor.data) + __pyx_t_16)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":367
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]:
- * X_Wmin_hor[i] = X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1]) # <<<<<<<<<<<<<<
- *
- * ## Select the best couple of values
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_21 = (((__pyx_v_j - __pyx_v_L) + __pyx_v_l) + 1);
- __pyx_t_20 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_hor.data) + __pyx_t_20)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_16 * __pyx_v_X.strides[0]) )) + __pyx_t_15)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X.data + __pyx_t_14 * __pyx_v_X.strides[0]) )) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_G.data + __pyx_t_22 * __pyx_v_G.strides[0]) )) + __pyx_t_21)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":366
- * if (X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) > X_Wmax_hor[i]:
- * X_Wmax_hor[i] = X[i, j - L + l + 1] - beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- * if (X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])) < X_Wmin_hor[i]: # <<<<<<<<<<<<<<
- * X_Wmin_hor[i] = X[i, j - L + l + 1] + beta_X * fabs(X[i, j - L + l + 1] - G[i, j - L + l + 1])
- *
- */
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":370
- *
- * ## Select the best couple of values
- * if (X_Emax_hor[i] - X_Wmin_hor[i]) >= (X_Wmax_hor[i] - X_Emin_hor[i]): # <<<<<<<<<<<<<<
- * Xp_max_hor[i] = X_Emax_hor[i]
- * Xp_min_hor[i] = X_Wmin_hor[i]
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_hor.data) + __pyx_t_21)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_hor.data) + __pyx_t_22)) )))) >= ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_hor.data) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_hor.data) + __pyx_t_14)) ))))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":371
- * ## Select the best couple of values
- * if (X_Emax_hor[i] - X_Wmin_hor[i]) >= (X_Wmax_hor[i] - X_Emin_hor[i]):
- * Xp_max_hor[i] = X_Emax_hor[i] # <<<<<<<<<<<<<<
- * Xp_min_hor[i] = X_Wmin_hor[i]
- * else:
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_hor.data) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_hor.data) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":372
- * if (X_Emax_hor[i] - X_Wmin_hor[i]) >= (X_Wmax_hor[i] - X_Emin_hor[i]):
- * Xp_max_hor[i] = X_Emax_hor[i]
- * Xp_min_hor[i] = X_Wmin_hor[i] # <<<<<<<<<<<<<<
- * else:
- * Xp_max_hor[i] = X_Wmax_hor[i]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_hor.data) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_hor.data) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":370
- *
- * ## Select the best couple of values
- * if (X_Emax_hor[i] - X_Wmin_hor[i]) >= (X_Wmax_hor[i] - X_Emin_hor[i]): # <<<<<<<<<<<<<<
- * Xp_max_hor[i] = X_Emax_hor[i]
- * Xp_min_hor[i] = X_Wmin_hor[i]
- */
- goto __pyx_L18;
- }
-
- /* "false_color_filtering/filter_cython.pyx":374
- * Xp_min_hor[i] = X_Wmin_hor[i]
- * else:
- * Xp_max_hor[i] = X_Wmax_hor[i] # <<<<<<<<<<<<<<
- * Xp_min_hor[i] = X_Emin_hor[i]
- * X_contrast_hor[i, j] = Xp_max_hor[i] - Xp_min_hor[i]
- */
- /*else*/ {
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_hor.data) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_hor.data) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":375
- * else:
- * Xp_max_hor[i] = X_Wmax_hor[i]
- * Xp_min_hor[i] = X_Emin_hor[i] # <<<<<<<<<<<<<<
- * X_contrast_hor[i, j] = Xp_max_hor[i] - Xp_min_hor[i]
- *
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_hor.data) + __pyx_t_23)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_hor.data) + __pyx_t_14)) )));
- }
- __pyx_L18:;
-
- /* "false_color_filtering/filter_cython.pyx":376
- * Xp_max_hor[i] = X_Wmax_hor[i]
- * Xp_min_hor[i] = X_Emin_hor[i]
- * X_contrast_hor[i, j] = Xp_max_hor[i] - Xp_min_hor[i] # <<<<<<<<<<<<<<
- *
- * L = L_ver
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast_hor.data + __pyx_t_22 * __pyx_v_X_contrast_hor.strides[0]) )) + __pyx_t_21)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_hor.data) + __pyx_t_14)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_hor.data) + __pyx_t_23)) ))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":351
- *
- * # for i in range(L, M - L, 1):
- * for i in prange(L, M - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, N - L, 1):
- * X_Emax_hor[i] = X[i, j]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":378
- * X_contrast_hor[i, j] = Xp_max_hor[i] - Xp_min_hor[i]
- *
- * L = L_ver # <<<<<<<<<<<<<<
- *
- * cdef DTYPE_t[:, ::1] X_contrast_ver = np.empty((N, M), dtype=DTYPE) # (N, M), vertical pass
- */
- __pyx_v_L = __pyx_v_L_ver;
-
- /* "false_color_filtering/filter_cython.pyx":380
- * L = L_ver
- *
- * cdef DTYPE_t[:, ::1] X_contrast_ver = np.empty((N, M), dtype=DTYPE) # (N, M), vertical pass # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] Xp_max_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] Xp_min_ver = np.empty(N, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 380, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_contrast_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":381
- *
- * cdef DTYPE_t[:, ::1] X_contrast_ver = np.empty((N, M), dtype=DTYPE) # (N, M), vertical pass
- * cdef DTYPE_t[::1] Xp_max_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] Xp_min_ver = np.empty(N, dtype=DTYPE)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 381, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_Xp_max_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":382
- * cdef DTYPE_t[:, ::1] X_contrast_ver = np.empty((N, M), dtype=DTYPE) # (N, M), vertical pass
- * cdef DTYPE_t[::1] Xp_max_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] Xp_min_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * cdef DTYPE_t[::1] X_Emax_ver = np.empty(N, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 382, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_Xp_min_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":384
- * cdef DTYPE_t[::1] Xp_min_ver = np.empty(N, dtype=DTYPE)
- *
- * cdef DTYPE_t[::1] X_Emax_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Emin_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_ver = np.empty(N, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 384, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_Emax_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":385
- *
- * cdef DTYPE_t[::1] X_Emax_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmax_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin_ver = np.empty(N, dtype=DTYPE)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_X_Emin_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":386
- * cdef DTYPE_t[::1] X_Emax_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Emin_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[::1] X_Wmin_ver = np.empty(N, dtype=DTYPE)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 386, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_X_Wmax_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":387
- * cdef DTYPE_t[::1] X_Emin_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmax_ver = np.empty(N, dtype=DTYPE)
- * cdef DTYPE_t[::1] X_Wmin_ver = np.empty(N, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * cdef DTYPE_t[:, ::1] Xt = transpose(X)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 387, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_X_Wmin_ver = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":389
- * cdef DTYPE_t[::1] X_Wmin_ver = np.empty(N, dtype=DTYPE)
- *
- * cdef DTYPE_t[:, ::1] Xt = transpose(X) # <<<<<<<<<<<<<<
- * cdef DTYPE_t[:, ::1] Gt = transpose(G)
- *
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_X); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 389, __pyx_L1_error)
- __pyx_v_Xt = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":390
- *
- * cdef DTYPE_t[:, ::1] Xt = transpose(X)
- * cdef DTYPE_t[:, ::1] Gt = transpose(G) # <<<<<<<<<<<<<<
- *
- * # for i in range(L, N - L, 1):
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_G); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 390, __pyx_L1_error)
- __pyx_v_Gt = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":393
- *
- * # for i in range(L, N - L, 1):
- * for i in prange(L, N - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, M - L, 1):
- * X_Emax_ver[i] = Xt[i, j]
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_7 = __pyx_v_L;
- __pyx_t_10 = (__pyx_v_N - __pyx_v_L);
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_10 - __pyx_t_7 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j) lastprivate(__pyx_v_l)
- #endif /* _OPENMP */
- for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9++){
- {
- __pyx_v_i = (Py_ssize_t)(__pyx_t_7 + 1 * __pyx_t_9);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
- __pyx_v_l = ((int)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":394
- * # for i in range(L, N - L, 1):
- * for i in prange(L, N - L, 1, nogil=True):
- * for j in range(L, M - L, 1): # <<<<<<<<<<<<<<
- * X_Emax_ver[i] = Xt[i, j]
- * X_Emin_ver[i] = Xt[i, j]
- */
- __pyx_t_11 = (__pyx_v_M - __pyx_v_L);
- __pyx_t_12 = __pyx_t_11;
- for (__pyx_t_13 = __pyx_v_L; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
- __pyx_v_j = __pyx_t_13;
-
- /* "false_color_filtering/filter_cython.pyx":395
- * for i in prange(L, N - L, 1, nogil=True):
- * for j in range(L, M - L, 1):
- * X_Emax_ver[i] = Xt[i, j] # <<<<<<<<<<<<<<
- * X_Emin_ver[i] = Xt[i, j]
- * X_Wmax_ver[i] = Xt[i, j]
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_21 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_ver.data) + __pyx_t_21)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_23 * __pyx_v_Xt.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":396
- * for j in range(L, M - L, 1):
- * X_Emax_ver[i] = Xt[i, j]
- * X_Emin_ver[i] = Xt[i, j] # <<<<<<<<<<<<<<
- * X_Wmax_ver[i] = Xt[i, j]
- * X_Wmin_ver[i] = Xt[i, j]
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_21 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_ver.data) + __pyx_t_21)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_14 * __pyx_v_Xt.strides[0]) )) + __pyx_t_23)) )));
-
- /* "false_color_filtering/filter_cython.pyx":397
- * X_Emax_ver[i] = Xt[i, j]
- * X_Emin_ver[i] = Xt[i, j]
- * X_Wmax_ver[i] = Xt[i, j] # <<<<<<<<<<<<<<
- * X_Wmin_ver[i] = Xt[i, j]
- *
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_j;
- __pyx_t_21 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_ver.data) + __pyx_t_21)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_23 * __pyx_v_Xt.strides[0]) )) + __pyx_t_14)) )));
-
- /* "false_color_filtering/filter_cython.pyx":398
- * X_Emin_ver[i] = Xt[i, j]
- * X_Wmax_ver[i] = Xt[i, j]
- * X_Wmin_ver[i] = Xt[i, j] # <<<<<<<<<<<<<<
- *
- * ## Recompute updated local max and min (Eq .(19))
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_21 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_ver.data) + __pyx_t_21)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_14 * __pyx_v_Xt.strides[0]) )) + __pyx_t_23)) )));
-
- /* "false_color_filtering/filter_cython.pyx":401
- *
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1): # <<<<<<<<<<<<<<
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]:
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- */
- __pyx_t_17 = __pyx_v_L;
- __pyx_t_18 = __pyx_t_17;
- for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
- __pyx_v_l = __pyx_t_19;
-
- /* "false_color_filtering/filter_cython.pyx":402
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1):
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]: # <<<<<<<<<<<<<<
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_23 * __pyx_v_Xt.strides[0]) )) + __pyx_t_14)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_21 * __pyx_v_Xt.strides[0]) )) + __pyx_t_22)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_15 * __pyx_v_Gt.strides[0]) )) + __pyx_t_16)) ))))))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_ver.data) + __pyx_t_20)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":403
- * for l in range(0, L, 1):
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]:
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1]) # <<<<<<<<<<<<<<
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- */
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_23 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_ver.data) + __pyx_t_23)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_20 * __pyx_v_Xt.strides[0]) )) + __pyx_t_16)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_15 * __pyx_v_Xt.strides[0]) )) + __pyx_t_22)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_21 * __pyx_v_Gt.strides[0]) )) + __pyx_t_14)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":402
- * ## Recompute updated local max and min (Eq .(19))
- * for l in range(0, L, 1):
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]: # <<<<<<<<<<<<<<
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":404
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]:
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]: # <<<<<<<<<<<<<<
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_21 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_14 * __pyx_v_Xt.strides[0]) )) + __pyx_t_21)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_22 * __pyx_v_Xt.strides[0]) )) + __pyx_t_15)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_16 * __pyx_v_Gt.strides[0]) )) + __pyx_t_20)) ))))))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_ver.data) + __pyx_t_23)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":405
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1]) # <<<<<<<<<<<<<<
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = (__pyx_v_j + __pyx_v_l);
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_21 = ((__pyx_v_j + __pyx_v_l) + 1);
- __pyx_t_14 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_ver.data) + __pyx_t_14)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_23 * __pyx_v_Xt.strides[0]) )) + __pyx_t_20)) ))) + (__pyx_v_beta_X * fabs((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_16 * __pyx_v_Xt.strides[0]) )) + __pyx_t_15)) ))) + 1.0) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_22 * __pyx_v_Gt.strides[0]) )) + __pyx_t_21)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":404
- * if (Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) > X_Emax_ver[i]:
- * X_Emax_ver[i] = Xt[i, j + l + 1] - beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]: # <<<<<<<<<<<<<<
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":406
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]: # <<<<<<<<<<<<<<
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]:
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_23 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_21 * __pyx_v_Xt.strides[0]) )) + __pyx_t_22)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_15 * __pyx_v_Xt.strides[0]) )) + __pyx_t_16)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_20 * __pyx_v_Gt.strides[0]) )) + __pyx_t_23)) ))))))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_ver.data) + __pyx_t_14)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":407
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l]) # <<<<<<<<<<<<<<
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]:
- * X_Wmin_ver[i] = Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- */
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_16 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_22 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_21 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_ver.data) + __pyx_t_21)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_14 * __pyx_v_Xt.strides[0]) )) + __pyx_t_23)) ))) - (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_20 * __pyx_v_Xt.strides[0]) )) + __pyx_t_16)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_15 * __pyx_v_Gt.strides[0]) )) + __pyx_t_22)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":406
- * if (Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l + 1] - Gt[i, j + l + 1])) < X_Emin_ver[i]:
- * X_Emin_ver[i] = Xt[i, j + l + 1] + beta_X * fabs(Xt[i, j + l] + 1 - Gt[i, j + l + 1])
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]: # <<<<<<<<<<<<<<
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]:
- */
- }
-
- /* "false_color_filtering/filter_cython.pyx":408
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]: # <<<<<<<<<<<<<<
- * X_Wmin_ver[i] = Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- *
- */
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_22 * __pyx_v_Xt.strides[0]) )) + __pyx_t_15)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_16 * __pyx_v_Xt.strides[0]) )) + __pyx_t_20)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_23 * __pyx_v_Gt.strides[0]) )) + __pyx_t_14)) ))))))) < (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_ver.data) + __pyx_t_21)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":409
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]:
- * X_Wmin_ver[i] = Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l]) # <<<<<<<<<<<<<<
- *
- * ## Select the best couple of values
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = ((__pyx_v_j - __pyx_v_L) + __pyx_v_l);
- __pyx_t_22 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_ver.data) + __pyx_t_22)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_21 * __pyx_v_Xt.strides[0]) )) + __pyx_t_14)) ))) + (__pyx_v_beta_X * fabs(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Xt.data + __pyx_t_23 * __pyx_v_Xt.strides[0]) )) + __pyx_t_20)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_Gt.data + __pyx_t_16 * __pyx_v_Gt.strides[0]) )) + __pyx_t_15)) )))))));
-
- /* "false_color_filtering/filter_cython.pyx":408
- * if (Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) > X_Wmax_ver[i]:
- * X_Wmax_ver[i] = Xt[i, j - L + l] - beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- * if (Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])) < X_Wmin_ver[i]: # <<<<<<<<<<<<<<
- * X_Wmin_ver[i] = Xt[i, j - L + l] + beta_X * fabs(Xt[i, j - L + l] - Gt[i, j - L + l])
- *
- */
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":412
- *
- * ## Select the best couple of values
- * if (X_Emax_ver[i] - X_Wmin_ver[i]) >= (X_Wmax_ver[i] - X_Emin_ver[i]): # <<<<<<<<<<<<<<
- * Xp_max_ver[i] = X_Emax_ver[i]
- * Xp_min_ver[i] = X_Wmin_ver[i]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_24 = ((((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_ver.data) + __pyx_t_15)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_ver.data) + __pyx_t_16)) )))) >= ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_ver.data) + __pyx_t_20)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_ver.data) + __pyx_t_23)) ))))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":413
- * ## Select the best couple of values
- * if (X_Emax_ver[i] - X_Wmin_ver[i]) >= (X_Wmax_ver[i] - X_Emin_ver[i]):
- * Xp_max_ver[i] = X_Emax_ver[i] # <<<<<<<<<<<<<<
- * Xp_min_ver[i] = X_Wmin_ver[i]
- * else:
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_ver.data) + __pyx_t_20)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emax_ver.data) + __pyx_t_23)) )));
-
- /* "false_color_filtering/filter_cython.pyx":414
- * if (X_Emax_ver[i] - X_Wmin_ver[i]) >= (X_Wmax_ver[i] - X_Emin_ver[i]):
- * Xp_max_ver[i] = X_Emax_ver[i]
- * Xp_min_ver[i] = X_Wmin_ver[i] # <<<<<<<<<<<<<<
- * else:
- * Xp_max_ver[i] = X_Wmax_ver[i]
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_ver.data) + __pyx_t_20)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmin_ver.data) + __pyx_t_23)) )));
-
- /* "false_color_filtering/filter_cython.pyx":412
- *
- * ## Select the best couple of values
- * if (X_Emax_ver[i] - X_Wmin_ver[i]) >= (X_Wmax_ver[i] - X_Emin_ver[i]): # <<<<<<<<<<<<<<
- * Xp_max_ver[i] = X_Emax_ver[i]
- * Xp_min_ver[i] = X_Wmin_ver[i]
- */
- goto __pyx_L36;
- }
-
- /* "false_color_filtering/filter_cython.pyx":416
- * Xp_min_ver[i] = X_Wmin_ver[i]
- * else:
- * Xp_max_ver[i] = X_Wmax_ver[i] # <<<<<<<<<<<<<<
- * Xp_min_ver[i] = X_Emin_ver[i]
- * X_contrast_ver[i, j] = Xp_max_ver[i] - Xp_min_ver[i]
- */
- /*else*/ {
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_ver.data) + __pyx_t_20)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Wmax_ver.data) + __pyx_t_23)) )));
-
- /* "false_color_filtering/filter_cython.pyx":417
- * else:
- * Xp_max_ver[i] = X_Wmax_ver[i]
- * Xp_min_ver[i] = X_Emin_ver[i] # <<<<<<<<<<<<<<
- * X_contrast_ver[i, j] = Xp_max_ver[i] - Xp_min_ver[i]
- * X_contrast_ver = transpose(X_contrast_ver) # (M, N)
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_ver.data) + __pyx_t_20)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_X_Emin_ver.data) + __pyx_t_23)) )));
- }
- __pyx_L36:;
-
- /* "false_color_filtering/filter_cython.pyx":418
- * Xp_max_ver[i] = X_Wmax_ver[i]
- * Xp_min_ver[i] = X_Emin_ver[i]
- * X_contrast_ver[i, j] = Xp_max_ver[i] - Xp_min_ver[i] # <<<<<<<<<<<<<<
- * X_contrast_ver = transpose(X_contrast_ver) # (M, N)
- *
- */
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast_ver.data + __pyx_t_16 * __pyx_v_X_contrast_ver.strides[0]) )) + __pyx_t_15)) )) = ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_max_ver.data) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_Xp_min_ver.data) + __pyx_t_20)) ))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":393
- *
- * # for i in range(L, N - L, 1):
- * for i in prange(L, N - L, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(L, M - L, 1):
- * X_Emax_ver[i] = Xt[i, j]
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L23;
- }
- __pyx_L23:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":419
- * Xp_min_ver[i] = X_Emin_ver[i]
- * X_contrast_ver[i, j] = Xp_max_ver[i] - Xp_min_ver[i]
- * X_contrast_ver = transpose(X_contrast_ver) # (M, N) # <<<<<<<<<<<<<<
- *
- * ## Compute X_contrast (Eq. (21))
- */
- __pyx_t_5 = __pyx_f_21false_color_filtering_13filter_cython_transpose(__pyx_v_X_contrast_ver); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 419, __pyx_L1_error)
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_contrast_ver, 1);
- __pyx_v_X_contrast_ver = __pyx_t_5;
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":422
- *
- * ## Compute X_contrast (Eq. (21))
- * cdef DTYPE_t[:, ::1] X_contrast = X_contrast_ver # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __PYX_INC_MEMVIEW(&__pyx_v_X_contrast_ver, 0);
- __pyx_v_X_contrast = __pyx_v_X_contrast_ver;
-
- /* "false_color_filtering/filter_cython.pyx":424
- * cdef DTYPE_t[:, ::1] X_contrast = X_contrast_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]:
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_8 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_10 = (__pyx_t_8 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_10 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_15, __pyx_t_16, __pyx_t_20, __pyx_t_23, __pyx_t_24)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_10; __pyx_t_9++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_9);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":425
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]:
- * X_contrast[i, j] = X_contrast_hor[i, j]
- */
- __pyx_t_11 = __pyx_v_N;
- __pyx_t_12 = __pyx_t_11;
- for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
- __pyx_v_j = __pyx_t_13;
-
- /* "false_color_filtering/filter_cython.pyx":426
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]: # <<<<<<<<<<<<<<
- * X_contrast[i, j] = X_contrast_hor[i, j]
- *
- */
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_24 = (((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast_hor.data + __pyx_t_20 * __pyx_v_X_contrast_hor.strides[0]) )) + __pyx_t_23)) ))) > (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast_ver.data + __pyx_t_15 * __pyx_v_X_contrast_ver.strides[0]) )) + __pyx_t_16)) )))) != 0);
- if (__pyx_t_24) {
-
- /* "false_color_filtering/filter_cython.pyx":427
- * for j in range(0, N, 1):
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]:
- * X_contrast[i, j] = X_contrast_hor[i, j] # <<<<<<<<<<<<<<
- *
- * ## Compute the arbitration weight (Eq. (22)) and the final filtered image (Eq. (17))
- */
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_23 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast.data + __pyx_t_23 * __pyx_v_X_contrast.strides[0]) )) + __pyx_t_20)) )) = (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast_hor.data + __pyx_t_16 * __pyx_v_X_contrast_hor.strides[0]) )) + __pyx_t_15)) )));
-
- /* "false_color_filtering/filter_cython.pyx":426
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1):
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]: # <<<<<<<<<<<<<<
- * X_contrast[i, j] = X_contrast_hor[i, j]
- *
- */
- }
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":424
- * cdef DTYPE_t[:, ::1] X_contrast = X_contrast_ver
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * if X_contrast_hor[i, j] > X_contrast_ver[i, j]:
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L41;
- }
- __pyx_L41:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":430
- *
- * ## Compute the arbitration weight (Eq. (22)) and the final filtered image (Eq. (17))
- * cdef DTYPE_t [::1] alpha_K = np.empty(M, dtype=DTYPE) # <<<<<<<<<<<<<<
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_21false_color_filtering_13filter_cython_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 430, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_alpha_K = __pyx_t_6;
- __pyx_t_6.memview = NULL;
- __pyx_t_6.data = NULL;
-
- /* "false_color_filtering/filter_cython.pyx":432
- * cdef DTYPE_t [::1] alpha_K = np.empty(M, dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * # alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / gamma_1, 1.0)
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_10 = __pyx_v_M;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_8 = (__pyx_t_10 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_8 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_25)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_j)
- #endif /* _OPENMP */
- for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9++){
- {
- __pyx_v_i = (Py_ssize_t)(0 + 1 * __pyx_t_9);
- /* Initialize private variables to invalid values */
- __pyx_v_j = ((Py_ssize_t)0xbad0bad0);
-
- /* "false_color_filtering/filter_cython.pyx":433
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True):
- * for j in range(0, N, 1): # <<<<<<<<<<<<<<
- * # alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / gamma_1, 1.0)
- * alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / fmin(fmax(X_max[i, j] - X_min[i, j], gamma_2), gamma_1), 1.0)
- */
- __pyx_t_11 = __pyx_v_N;
- __pyx_t_12 = __pyx_t_11;
- for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
- __pyx_v_j = __pyx_t_13;
-
- /* "false_color_filtering/filter_cython.pyx":435
- * for j in range(0, N, 1):
- * # alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / gamma_1, 1.0)
- * alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / fmin(fmax(X_max[i, j] - X_min[i, j], gamma_2), gamma_1), 1.0) # <<<<<<<<<<<<<<
- * K_out[i, j] = (1 - alpha_K[i]) * K_TI[i, j] + alpha_K[i] * K[i, j]
- */
- __pyx_t_15 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_j;
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_21 = __pyx_v_j;
- __pyx_t_22 = __pyx_v_i;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_alpha_K.data) + __pyx_t_22)) )) = fmin((fmax((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_contrast.data + __pyx_t_15 * __pyx_v_X_contrast.strides[0]) )) + __pyx_t_16)) ))), 0.0) / fmin(fmax(((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_max.data + __pyx_t_20 * __pyx_v_X_max.strides[0]) )) + __pyx_t_23)) ))) - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_X_min.data + __pyx_t_14 * __pyx_v_X_min.strides[0]) )) + __pyx_t_21)) )))), __pyx_v_gamma_2), __pyx_v_gamma_1)), 1.0);
-
- /* "false_color_filtering/filter_cython.pyx":436
- * # alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / gamma_1, 1.0)
- * alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / fmin(fmax(X_max[i, j] - X_min[i, j], gamma_2), gamma_1), 1.0)
- * K_out[i, j] = (1 - alpha_K[i]) * K_TI[i, j] + alpha_K[i] * K[i, j] # <<<<<<<<<<<<<<
- */
- __pyx_t_21 = __pyx_v_i;
- __pyx_t_14 = __pyx_v_i;
- __pyx_t_23 = __pyx_v_j;
- __pyx_t_20 = __pyx_v_i;
- __pyx_t_16 = __pyx_v_i;
- __pyx_t_15 = __pyx_v_j;
- __pyx_t_22 = __pyx_v_i;
- __pyx_t_25 = __pyx_v_j;
- *((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_out.data + __pyx_t_22 * __pyx_v_K_out.strides[0]) )) + __pyx_t_25)) )) = (((1.0 - (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_alpha_K.data) + __pyx_t_21)) )))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K_TI.data + __pyx_t_14 * __pyx_v_K_TI.strides[0]) )) + __pyx_t_23)) )))) + ((*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) __pyx_v_alpha_K.data) + __pyx_t_20)) ))) * (*((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=1 */ ((char *) (((__pyx_t_21false_color_filtering_13filter_cython_DTYPE_t *) ( /* dim=0 */ (__pyx_v_K.data + __pyx_t_16 * __pyx_v_K.strides[0]) )) + __pyx_t_15)) )))));
- }
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "false_color_filtering/filter_cython.pyx":432
- * cdef DTYPE_t [::1] alpha_K = np.empty(M, dtype=DTYPE)
- * # for i in range(0, M, 1):
- * for i in prange(0, M, 1, nogil=True): # <<<<<<<<<<<<<<
- * for j in range(0, N, 1):
- * # alpha_K[i] = fmin(fmax(X_contrast[i, j], 0.0) / gamma_1, 1.0)
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L53;
- }
- __pyx_L53:;
- }
- }
-
- /* "false_color_filtering/filter_cython.pyx":329
- * @cython.nonecheck(False)
- * @cython.cdivision(True)
- * cdef void arbitration(DTYPE_t[:, ::1] K, DTYPE_t[:, ::1] K_TI, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] G, DTYPE_t[:, ::1] X_max, # <<<<<<<<<<<<<<
- * DTYPE_t[:, ::1] X_min, DTYPE_t beta_X, int L_hor, int L_ver, DTYPE_t gamma_1,
- * DTYPE_t gamma_2, DTYPE_t[:, ::1] K_out):
- */
-
- /* function exit code */
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
- __Pyx_WriteUnraisable("false_color_filtering.filter_cython.arbitration", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
- __pyx_L0:;
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_contrast_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xp_max_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xp_min_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emax_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emin_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmax_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmin_hor, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_contrast_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xp_max_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xp_min_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emax_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Emin_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmax_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_Wmin_ver, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Xt, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_Gt, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_X_contrast, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_alpha_K, 1);
- __Pyx_RefNannyFinishContext();
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
- * # experimental exception made for __getbuffer__ and __releasebuffer__
- * # -- the details of this may change.
- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
- * # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fulfill the PEP.
- */
-
-/* Python wrapper */
-static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_v_i;
- int __pyx_v_ndim;
- int __pyx_v_endian_detector;
- int __pyx_v_little_endian;
- int __pyx_v_t;
- char *__pyx_v_f;
- PyArray_Descr *__pyx_v_descr = 0;
- int __pyx_v_offset;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_t_5;
- int __pyx_t_6;
- PyArray_Descr *__pyx_t_7;
- PyObject *__pyx_t_8 = NULL;
- char *__pyx_t_9;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- if (__pyx_v_info == NULL) {
- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
- return -1;
- }
- __Pyx_RefNannySetupContext("__getbuffer__", 0);
- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(__pyx_v_info->obj);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
- *
- * cdef int i, ndim
- * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
- * cdef bint little_endian = ((&endian_detector)[0] != 0)
- *
- */
- __pyx_v_endian_detector = 1;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
- * cdef int i, ndim
- * cdef int endian_detector = 1
- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
- *
- * ndim = PyArray_NDIM(self)
- */
- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
- * cdef bint little_endian = ((&endian_detector)[0] != 0)
- *
- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
- */
- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
- * ndim = PyArray_NDIM(self)
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
- */
- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L4_bool_binop_done;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
- * raise ValueError(u"ndarray is not C contiguous")
- *
- */
- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L4_bool_binop_done:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
- * ndim = PyArray_NDIM(self)
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
- */
- if (unlikely(__pyx_t_1)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 272, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
- * ndim = PyArray_NDIM(self)
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
- * raise ValueError(u"ndarray is not C contiguous")
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not Fortran contiguous")
- */
- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L7_bool_binop_done;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
- * raise ValueError(u"ndarray is not Fortran contiguous")
- *
- */
- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L7_bool_binop_done:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
- * raise ValueError(u"ndarray is not C contiguous")
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not Fortran contiguous")
- */
- if (unlikely(__pyx_t_1)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
- *
- * info.buf = PyArray_DATA(self)
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 276, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
- * raise ValueError(u"ndarray is not C contiguous")
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not Fortran contiguous")
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
- * raise ValueError(u"ndarray is not Fortran contiguous")
- *
- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
- * info.ndim = ndim
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- */
- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
- *
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim # <<<<<<<<<<<<<<
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * # Allocate new buffer for strides and shape info.
- */
- __pyx_v_info->ndim = __pyx_v_ndim;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
- */
- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
- if (__pyx_t_1) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<<
- * info.shape = info.strides + ndim
- * for i in range(ndim):
- */
- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
- * # This is allocated as one block, strides first.
- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim)
- * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i]
- */
- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim)
- * info.shape = info.strides + ndim
- * for i in range(ndim): # <<<<<<<<<<<<<<
- * info.strides[i] = PyArray_STRIDES(self)[i]
- * info.shape[i] = PyArray_DIMS(self)[i]
- */
- __pyx_t_4 = __pyx_v_ndim;
- __pyx_t_5 = __pyx_t_4;
- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
- __pyx_v_i = __pyx_t_6;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
- * info.shape = info.strides + ndim
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
- * info.shape[i] = PyArray_DIMS(self)[i]
- * else:
- */
- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i]
- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
- * else:
- * info.strides = PyArray_STRIDES(self)
- */
- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
- */
- goto __pyx_L9;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
- * info.shape[i] = PyArray_DIMS(self)[i]
- * else:
- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<<
- * info.shape = PyArray_DIMS(self)
- * info.suboffsets = NULL
- */
- /*else*/ {
- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
- * else:
- * info.strides = PyArray_STRIDES(self)
- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<<
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self)
- */
- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
- }
- __pyx_L9:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
- * info.strides = PyArray_STRIDES(self)
- * info.shape = PyArray_DIMS(self)
- * info.suboffsets = NULL # <<<<<<<<<<<<<<
- * info.itemsize = PyArray_ITEMSIZE(self)
- * info.readonly = not PyArray_ISWRITEABLE(self)
- */
- __pyx_v_info->suboffsets = NULL;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
- * info.shape = PyArray_DIMS(self)
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
- * info.readonly = not PyArray_ISWRITEABLE(self)
- *
- */
- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self)
- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
- *
- * cdef int t
- */
- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
- *
- * cdef int t
- * cdef char* f = NULL # <<<<<<<<<<<<<<
- * cdef dtype descr = PyArray_DESCR(self)
- * cdef int offset
- */
- __pyx_v_f = NULL;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
- * cdef int t
- * cdef char* f = NULL
- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<<
- * cdef int offset
- *
- */
- __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
- __pyx_t_3 = ((PyObject *)__pyx_t_7);
- __Pyx_INCREF(__pyx_t_3);
- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
- * cdef int offset
- *
- * info.obj = self # <<<<<<<<<<<<<<
- *
- * if not PyDataType_HASFIELDS(descr):
- */
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj);
- __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
- * info.obj = self
- *
- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
- */
- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
- if (__pyx_t_1) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
- *
- * if not PyDataType_HASFIELDS(descr):
- * t = descr.type_num # <<<<<<<<<<<<<<
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)):
- */
- __pyx_t_4 = __pyx_v_descr->type_num;
- __pyx_v_t = __pyx_t_4;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
- * if not PyDataType_HASFIELDS(descr):
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
- if (!__pyx_t_2) {
- goto __pyx_L15_next_or;
- } else {
- }
- __pyx_t_2 = (__pyx_v_little_endian != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L14_bool_binop_done;
- }
- __pyx_L15_next_or:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b"
- */
- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L14_bool_binop_done;
- }
- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L14_bool_binop_done:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
- * if not PyDataType_HASFIELDS(descr):
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- if (unlikely(__pyx_t_1)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B"
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 306, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 306, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
- * if not PyDataType_HASFIELDS(descr):
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h"
- */
- switch (__pyx_v_t) {
- case NPY_BYTE:
- __pyx_v_f = ((char *)"b");
- break;
- case NPY_UBYTE:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H"
- */
- __pyx_v_f = ((char *)"B");
- break;
- case NPY_SHORT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i"
- */
- __pyx_v_f = ((char *)"h");
- break;
- case NPY_USHORT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I"
- */
- __pyx_v_f = ((char *)"H");
- break;
- case NPY_INT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l"
- */
- __pyx_v_f = ((char *)"i");
- break;
- case NPY_UINT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L"
- */
- __pyx_v_f = ((char *)"I");
- break;
- case NPY_LONG:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q"
- */
- __pyx_v_f = ((char *)"l");
- break;
- case NPY_ULONG:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q"
- */
- __pyx_v_f = ((char *)"L");
- break;
- case NPY_LONGLONG:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f"
- */
- __pyx_v_f = ((char *)"q");
- break;
- case NPY_ULONGLONG:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d"
- */
- __pyx_v_f = ((char *)"Q");
- break;
- case NPY_FLOAT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g"
- */
- __pyx_v_f = ((char *)"f");
- break;
- case NPY_DOUBLE:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf"
- */
- __pyx_v_f = ((char *)"d");
- break;
- case NPY_LONGDOUBLE:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd"
- */
- __pyx_v_f = ((char *)"g");
- break;
- case NPY_CFLOAT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
- */
- __pyx_v_f = ((char *)"Zf");
- break;
- case NPY_CDOUBLE:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
- * elif t == NPY_OBJECT: f = "O"
- */
- __pyx_v_f = ((char *)"Zd");
- break;
- case NPY_CLONGDOUBLE:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
- * elif t == NPY_OBJECT: f = "O"
- * else:
- */
- __pyx_v_f = ((char *)"Zg");
- break;
- case NPY_OBJECT:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- */
- __pyx_v_f = ((char *)"O");
- break;
- default:
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
- * elif t == NPY_OBJECT: f = "O"
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
- * info.format = f
- * return
- */
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 325, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 325, __pyx_L1_error)
- break;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * info.format = f # <<<<<<<<<<<<<<
- * return
- * else:
- */
- __pyx_v_info->format = __pyx_v_f;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * info.format = f
- * return # <<<<<<<<<<<<<<
- * else:
- * info.format = PyObject_Malloc(_buffer_format_string_len)
- */
- __pyx_r = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
- * info.obj = self
- *
- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
- * return
- * else:
- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0
- */
- /*else*/ {
- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
- * else:
- * info.format = PyObject_Malloc(_buffer_format_string_len)
- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
- * offset = 0
- * f = _util_dtypestring(descr, info.format + 1,
- */
- (__pyx_v_info->format[0]) = '^';
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
- * info.format = PyObject_Malloc(_buffer_format_string_len)
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0 # <<<<<<<<<<<<<<
- * f = _util_dtypestring(descr, info.format + 1,
- * info.format + _buffer_format_string_len,
- */
- __pyx_v_offset = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0
- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
- * info.format + _buffer_format_string_len,
- * &offset)
- */
- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)
- __pyx_v_f = __pyx_t_9;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
- * info.format + _buffer_format_string_len,
- * &offset)
- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- */
- (__pyx_v_f[0]) = '\x00';
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
- * # experimental exception made for __getbuffer__ and __releasebuffer__
- * # -- the details of this may change.
- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
- * # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fulfill the PEP.
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- if (__pyx_v_info->obj != NULL) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- goto __pyx_L2;
- __pyx_L0:;
- if (__pyx_v_info->obj == Py_None) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- __pyx_L2:;
- __Pyx_XDECREF((PyObject *)__pyx_v_descr);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
- * f[0] = c'\0' # Terminate format string
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
- * if PyArray_HASFIELDS(self):
- * PyObject_Free(info.format)
- */
-
-/* Python wrapper */
-static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
-static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("__releasebuffer__", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * PyObject_Free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- */
- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
- if (__pyx_t_1) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self):
- * PyObject_Free(info.format) # <<<<<<<<<<<<<<
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * PyObject_Free(info.strides)
- */
- PyObject_Free(__pyx_v_info->format);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * PyObject_Free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
- * if PyArray_HASFIELDS(self):
- * PyObject_Free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * PyObject_Free(info.strides)
- * # info.shape was stored after info.strides in the same block
- */
- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
- if (__pyx_t_1) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
- * PyObject_Free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
- * # info.shape was stored after info.strides in the same block
- *
- */
- PyObject_Free(__pyx_v_info->strides);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
- * if PyArray_HASFIELDS(self):
- * PyObject_Free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * PyObject_Free(info.strides)
- * # info.shape was stored after info.strides in the same block
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
- * f[0] = c'\0' # Terminate format string
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
- * if PyArray_HASFIELDS(self):
- * PyObject_Free(info.format)
- */
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, a)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
- *
- * cdef inline object PyArray_MultiIterNew1(a):
- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 821, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, a)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823
- * return PyArray_MultiIterNew(1, a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, a, b)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 824, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823
- * return PyArray_MultiIterNew(1, a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, a, b)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826
- * return PyArray_MultiIterNew(2, a, b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 827, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826
- * return PyArray_MultiIterNew(2, a, b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 830, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<<
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 833, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":835
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
- * return d.subarray.shape
- * else:
- */
- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
- if (__pyx_t_1) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape # <<<<<<<<<<<<<<
- * else:
- * return ()
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
- * return d.subarray.shape
- * else:
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839
- * return d.subarray.shape
- * else:
- * return () # <<<<<<<<<<<<<<
- *
- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
- */
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_empty_tuple);
- __pyx_r = __pyx_empty_tuple;
- goto __pyx_L0;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":835
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841
- * return ()
- *
- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
- * # Recursive utility function used in __getbuffer__ to get format
- * # string. The new location in the format string is returned.
- */
-
-static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
- PyArray_Descr *__pyx_v_child = 0;
- int __pyx_v_endian_detector;
- int __pyx_v_little_endian;
- PyObject *__pyx_v_fields = 0;
- PyObject *__pyx_v_childname = NULL;
- PyObject *__pyx_v_new_offset = NULL;
- PyObject *__pyx_v_t = NULL;
- char *__pyx_r;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- Py_ssize_t __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_t_5;
- int __pyx_t_6;
- int __pyx_t_7;
- long __pyx_t_8;
- char *__pyx_t_9;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_util_dtypestring", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846
- *
- * cdef dtype child
- * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
- * cdef bint little_endian = ((&endian_detector)[0] != 0)
- * cdef tuple fields
- */
- __pyx_v_endian_detector = 1;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
- * cdef dtype child
- * cdef int endian_detector = 1
- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
- * cdef tuple fields
- *
- */
- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850
- * cdef tuple fields
- *
- * for childname in descr.names: # <<<<<<<<<<<<<<
- * fields = descr.fields[childname]
- * child, new_offset = fields
- */
- if (unlikely(__pyx_v_descr->names == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(1, 850, __pyx_L1_error)
- }
- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
- for (;;) {
- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 850, __pyx_L1_error)
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- #endif
- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
- *
- * for childname in descr.names:
- * fields = descr.fields[childname] # <<<<<<<<<<<<<<
- * child, new_offset = fields
- *
- */
- if (unlikely(__pyx_v_descr->fields == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(1, 851, __pyx_L1_error)
- }
- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 851, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 851, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
- __pyx_t_3 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
- * for childname in descr.names:
- * fields = descr.fields[childname]
- * child, new_offset = fields # <<<<<<<<<<<<<<
- *
- * if (end - f) - (new_offset - offset[0]) < 15:
- */
- if (likely(__pyx_v_fields != Py_None)) {
- PyObject* sequence = __pyx_v_fields;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(1, 852, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_4);
- #else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 852, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 852, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 852, __pyx_L1_error)
- }
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 852, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
- __pyx_t_3 = 0;
- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":854
- * child, new_offset = fields
- *
- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
- *
- */
- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 854, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 854, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 854, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
- if (unlikely(__pyx_t_6)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
- *
- * if (end - f) - (new_offset - offset[0]) < 15:
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
- *
- * if ((child.byteorder == c'>' and little_endian) or
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 855, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 855, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":854
- * child, new_offset = fields
- *
- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
- *
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":857
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
- *
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
- if (!__pyx_t_7) {
- goto __pyx_L8_next_or;
- } else {
- }
- __pyx_t_7 = (__pyx_v_little_endian != 0);
- if (!__pyx_t_7) {
- } else {
- __pyx_t_6 = __pyx_t_7;
- goto __pyx_L7_bool_binop_done;
- }
- __pyx_L8_next_or:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
- *
- * if ((child.byteorder == c'>' and little_endian) or
- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
- * raise ValueError(u"Non-native byte order not supported")
- * # One could encode it in the format string and have Cython
- */
- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
- if (__pyx_t_7) {
- } else {
- __pyx_t_6 = __pyx_t_7;
- goto __pyx_L7_bool_binop_done;
- }
- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
- __pyx_t_6 = __pyx_t_7;
- __pyx_L7_bool_binop_done:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":857
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
- *
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- if (unlikely(__pyx_t_6)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
- * if ((child.byteorder == c'>' and little_endian) or
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
- * # One could encode it in the format string and have Cython
- * # complain instead, BUT: < and > in format strings also imply
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 859, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 859, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":857
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
- *
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":869
- *
- * # Output padding bytes
- * while offset[0] < new_offset: # <<<<<<<<<<<<<<
- * f[0] = 120 # "x"; pad byte
- * f += 1
- */
- while (1) {
- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 869, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 869, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 869, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!__pyx_t_6) break;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
- * # Output padding bytes
- * while offset[0] < new_offset:
- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
- * f += 1
- * offset[0] += 1
- */
- (__pyx_v_f[0]) = 0x78;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
- * while offset[0] < new_offset:
- * f[0] = 120 # "x"; pad byte
- * f += 1 # <<<<<<<<<<<<<<
- * offset[0] += 1
- *
- */
- __pyx_v_f = (__pyx_v_f + 1);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
- * f[0] = 120 # "x"; pad byte
- * f += 1
- * offset[0] += 1 # <<<<<<<<<<<<<<
- *
- * offset[0] += child.itemsize
- */
- __pyx_t_8 = 0;
- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":874
- * offset[0] += 1
- *
- * offset[0] += child.itemsize # <<<<<<<<<<<<<<
- *
- * if not PyDataType_HASFIELDS(child):
- */
- __pyx_t_8 = 0;
- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":876
- * offset[0] += child.itemsize
- *
- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
- * t = child.type_num
- * if end - f < 5:
- */
- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
- if (__pyx_t_6) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
- *
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num # <<<<<<<<<<<<<<
- * if end - f < 5:
- * raise RuntimeError(u"Format string allocated too short.")
- */
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 877, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num
- * if end - f < 5: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short.")
- *
- */
- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
- if (unlikely(__pyx_t_6)) {
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
- * t = child.type_num
- * if end - f < 5:
- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
- *
- * # Until ticket #99 is fixed, use integers to avoid warnings
- */
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 879, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(1, 879, __pyx_L1_error)
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num
- * if end - f < 5: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short.")
- *
- */
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":882
- *
- * # Until ticket #99 is fixed, use integers to avoid warnings
- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 882, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 882, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 882, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 98;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
- * # Until ticket #99 is fixed, use integers to avoid warnings
- * if t == NPY_BYTE: f[0] = 98 #"b"
- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 883, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 883, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 883, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 66;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
- * if t == NPY_BYTE: f[0] = 98 #"b"
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 884, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 884, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x68;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
- * elif t == NPY_INT: f[0] = 105 #"i"
- * elif t == NPY_UINT: f[0] = 73 #"I"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 885, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 885, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 885, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 72;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
- * elif t == NPY_UINT: f[0] = 73 #"I"
- * elif t == NPY_LONG: f[0] = 108 #"l"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 886, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 886, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x69;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i"
- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 887, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 887, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 73;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
- * elif t == NPY_INT: f[0] = 105 #"i"
- * elif t == NPY_UINT: f[0] = 73 #"I"
- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 888, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 888, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 888, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x6C;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
- * elif t == NPY_UINT: f[0] = 73 #"I"
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 889, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 889, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 889, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 76;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 890, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 890, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 890, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x71;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 891, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 891, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 891, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 81;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 892, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 892, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 892, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x66;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 893, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 893, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 893, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x64;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 894, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 894, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 894, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x67;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 895, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 895, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 895, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x66;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 896, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 896, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 896, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x64;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
- * else:
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 897, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 897, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 897, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x67;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 898, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 898, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 898, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (likely(__pyx_t_6)) {
- (__pyx_v_f[0]) = 79;
- goto __pyx_L15;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":900
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
- * f += 1
- * else:
- */
- /*else*/ {
- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 900, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 900, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(1, 900, __pyx_L1_error)
- }
- __pyx_L15:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * f += 1 # <<<<<<<<<<<<<<
- * else:
- * # Cython ignores struct boundary information ("T{...}"),
- */
- __pyx_v_f = (__pyx_v_f + 1);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":876
- * offset[0] += child.itemsize
- *
- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
- * t = child.type_num
- * if end - f < 5:
- */
- goto __pyx_L13;
- }
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":905
- * # Cython ignores struct boundary information ("T{...}"),
- * # so don't output it
- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
- * return f
- *
- */
- /*else*/ {
- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 905, __pyx_L1_error)
- __pyx_v_f = __pyx_t_9;
- }
- __pyx_L13:;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850
- * cdef tuple fields
- *
- * for childname in descr.names: # <<<<<<<<<<<<<<
- * fields = descr.fields[childname]
- * child, new_offset = fields
- */
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
- * # so don't output it
- * f = _util_dtypestring(child, f, end, offset)
- * return f # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_r = __pyx_v_f;
- goto __pyx_L0;
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841
- * return ()
- *
- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
- * # Recursive utility function used in __getbuffer__ to get format
- * # string. The new location in the format string is returned.
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_child);
- __Pyx_XDECREF(__pyx_v_fields);
- __Pyx_XDECREF(__pyx_v_childname);
- __Pyx_XDECREF(__pyx_v_new_offset);
- __Pyx_XDECREF(__pyx_v_t);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1021
- * int _import_umath() except -1
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base)
- */
-
-static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("set_array_base", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
- *
- * cdef inline void set_array_base(ndarray arr, object base):
- * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
- * PyArray_SetBaseObject(arr, base)
- *
- */
- Py_INCREF(__pyx_v_base);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
- * cdef inline void set_array_base(ndarray arr, object base):
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
- *
- * cdef inline object get_array_base(ndarray arr):
- */
- (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1021
- * int _import_umath() except -1
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base)
- */
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-/* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1025
- * PyArray_SetBaseObject(arr, base)
- *
- * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
- * base = PyArray_BASE(arr)
- * if base is NULL:
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
- PyObject *__pyx_v_base;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("get_array_base", 0);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
- *
- * cdef inline object get_array_base(ndarray arr):
- * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
- * if base is NULL:
- * return None
- */
- __pyx_v_base = PyArray_BASE(__pyx_v_arr);
-
- /* "../anaconda3/envs/pytorch/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
- * cdef inline object get_array_base(ndarray arr):
- * base = PyArray_BASE(arr)
- * if base is NULL: # <<<<<<<<<<<<<<
- * return None
- * return