Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

naive fix for non-tuple sequence warnings #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions aicsimageprocessing/rigidAlignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def cell_rigid_registration(

_, croprange = crop_img(get_channel(img, ch_crop), method="bigger")

img = img[croprange]
img = img[tuple(croprange)]

img = align_major(img, angle)

Expand Down Expand Up @@ -58,7 +58,7 @@ def cell_rigid_registration(

croprange = [slice(s, e) for s, e in ranges]

img = img[croprange]
img = img[tuple(croprange)]

img = np.pad(img, pad_width, mode="constant", constant_values=0)

Expand Down Expand Up @@ -156,7 +156,7 @@ def crop_img(img, method="tight"):
# dont crop the channel dimension
croprange[0] = slice(0, None)

img_out = img[croprange]
img_out = img[tuple(croprange)]

return img_out, croprange

Expand All @@ -171,7 +171,7 @@ def get_flipdims(img):
def pad_to_position(img, ch_crop, ch_com, com_target, imsize_target):

_, croprange_pt2 = crop_img(get_channel(img, ch_crop))
img = img[croprange_pt2]
img = img[tuple(croprange_pt2)]

com = get_center_of_mass(get_channel(img, ch_com))

Expand All @@ -190,7 +190,7 @@ def pad_to_position(img, ch_crop, ch_com, com_target, imsize_target):

# def pad_to_center(img, com):
# _, croprange_pt2 = crop_img(get_channel(img, ch_crop))
# img = img[croprange_pt2]
# img = img[tuple(croprange_pt2)]
#
# com = get_center_of_mass(get_channel(img, ch_com))
#
Expand Down