You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using a Path object from pathlib to automate a folder analysis, and it seems that load_data() doesn't work with Path objects (at least on Windows). Code:
pix_per_um = 1.0 / 0.1018971
E = 3000
p = Path('../data/')
dir = p / 'cells' / '1kPa'
refs = set(dir .glob('*_ref.tif'))
imgs = set(dir .glob('*.tif')) - refs
dataset = list(zip(sorted(imgs), sorted(refs)))
traction_obj = TractionForce(pix_per_um, E=E)
for img_path, ref_path in dataset:
img, ref, _ = traction_obj.load_data(img_path, ref_path)
Raises: RuntimeWarning: Please ensure that the input image has shape (f,c,w,h) the current shape is (1088, 1590)
This is (at least temporarily) solved by changing the last line to: img, ref, _ = traction_obj.load_data(str(img_path), str(ref_path))
The text was updated successfully, but these errors were encountered:
I tried using a Path object from pathlib to automate a folder analysis, and it seems that load_data() doesn't work with Path objects (at least on Windows). Code:
Raises:
RuntimeWarning: Please ensure that the input image has shape (f,c,w,h) the current shape is (1088, 1590)
This is (at least temporarily) solved by changing the last line to:
img, ref, _ = traction_obj.load_data(str(img_path), str(ref_path))
The text was updated successfully, but these errors were encountered: