Skip to content

Commit

Permalink
fix load_png_images to use bounding box starts & stops (#303)
Browse files Browse the repository at this point in the history
* fix load_png_images to use bounding box starts & stops

* add conftest.py

---------

Co-authored-by: Erik Schomburg <[email protected]>
  • Loading branch information
eschombu and eschombu authored Mar 8, 2024
1 parent c183ccb commit ab12d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chunkflow/flow/load_pngs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def load_image(file_name: str):
# img = np.expand_dims(img, axis=0)
return img


def load_png_images(
path_prefix: str,
bbox: BoundingBox = None,
Expand Down Expand Up @@ -59,7 +60,7 @@ def load_png_images(
if os.path.exists(file_name):
img = load_image(file_name)
img = img.astype(dtype=dtype)
chunk.array[z_offset, :, :] = img
chunk.array[z_offset, :, :] = img[bbox.start[1]:bbox.stop[1], bbox.start[2]:bbox.stop[2]]
else:
print(f'image file do not exist: {file_name}')

Expand Down
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest_plugins = ['chunkflow']

0 comments on commit ab12d66

Please sign in to comment.