Skip to content

Commit

Permalink
💅
Browse files Browse the repository at this point in the history
  • Loading branch information
vovaf709 committed Jul 30, 2024
1 parent 781ee73 commit 53c4f61
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions imops/src/_backprojection.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ cdef FLOAT accumulate(FLOAT x, FLOAT y, const FLOAT* sinuses, const FLOAT* cosin
@cython.boundscheck(False)
@cython.wraparound(False)
cpdef FLOAT[:, :, :] backprojection3d(const FLOAT[:, :, :] sinogram, const FLOAT[:] theta, FLOAT[:] xs,
const uint8[:, :] inside_circle, FLOAT fill_value, int image_size, int output_size,
Py_ssize_t num_threads):
const uint8[:, :] inside_circle, FLOAT fill_value, int image_size,
int output_size, Py_ssize_t num_threads):
cdef FLOAT[:, :, :] result = np.zeros_like(sinogram, shape=(len(sinogram), output_size, output_size))
cdef Py_ssize_t slc, i, j, n_angles = len(theta), n_slices = len(sinogram)
cdef FLOAT min_val = image_size // 2, right_lim = image_size - 1
Expand Down
3 changes: 2 additions & 1 deletion imops/src/_measure.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ cdef inline Py_ssize_t _find(LABEL num, const LABEL[:] nums) noexcept nogil:
return -1


def _labeled_center_of_mass(const double[:, :, :] nums, const LABEL[:, :, :] labels, const LABEL[:] index) -> np.ndarray:
def _labeled_center_of_mass(const double[:, :, :] nums, const LABEL[:, :, :] labels,
const LABEL[:] index) -> np.ndarray:
cdef const double[:, :, ::1] contiguous_nums = np.ascontiguousarray(nums)
cdef const LABEL[:, :, ::1] contiguous_labels = np.ascontiguousarray(labels)
cdef const LABEL[:] contiguous_index = np.ascontiguousarray(index)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_morphology.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from imops.backend import Backend, Scipy
from imops.morphology import binary_closing, binary_dilation, binary_erosion, binary_opening, distance_transform_edt
from imops.pad import restore_crop

from imops.utils import make_immutable


np.random.seed(1337)

assert_eq = np.testing.assert_array_equal
Expand Down
2 changes: 1 addition & 1 deletion tests/test_radon.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from imops.backend import Backend
from imops.radon import inverse_radon, radon
from imops.testing import fill_outside, sample_ct, sk_iradon, sk_radon
from imops.utils import make_immutable, make_mutable
from imops.utils import make_immutable


np.random.seed(1337)
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
imops_num_threads,
isin,
make_immutable,
make_mutable,
normalize_num_threads,
set_num_threads,
)
Expand Down

0 comments on commit 53c4f61

Please sign in to comment.