Skip to content

Commit

Permalink
add examples I/O
Browse files Browse the repository at this point in the history
  • Loading branch information
Henley13 committed May 5, 2020
1 parent cf105bc commit 11c6279
Show file tree
Hide file tree
Showing 10 changed files with 928 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ dist/
big_fish.egg-info/

# Notebooks
notebooks/
notebooks/old
notebooks/.ipynb_checkpoints

# Data
data/input/*
data/output/*

# Cache
__pycache__/
.pytest_cache/
17 changes: 11 additions & 6 deletions bigfish/stack/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from skimage import img_as_uint
from skimage.exposure import rescale_intensity

# TODO only read in memory on or several channel (and not the entire image)


# ### Building stack ###

Expand Down Expand Up @@ -107,9 +109,10 @@ def build_stacks(data_map, input_dimension=None, sanity_check=False,
data_map : List[tuple]
Map between input directories and recipes.
input_dimension : int
Number of dimensions of the loaded files.
Number of dimensions of the loaded files. Can speed up the function if
provided.
sanity_check : bool
Check the validity of the loaded tensor.
Check the validity of the loaded tensor. Can slow down the function.
return_origin : bool
Return the input directory and the recipe used to build the stack.
Expand Down Expand Up @@ -213,11 +216,12 @@ def build_stack(recipe, input_folder, input_dimension=None, sanity_check=False,
input_folder : str
Path of the folder containing the images.
input_dimension : int
Number of dimensions of the loaded files.
Number of dimensions of the loaded files. Can speed up the function if
provided.
i_fov : int
Index of the fov to build.
sanity_check : bool
Check the validity of the loaded tensor.
Check the validity of the loaded tensor. Can slow down the function.
Returns
-------
Expand Down Expand Up @@ -532,9 +536,10 @@ def build_stack_no_recipe(paths, input_dimension=None, sanity_check=False):
paths : List[str]
List of the paths to stack.
input_dimension : str
Number of dimensions of the loaded files.
Number of dimensions of the loaded files. Can speed up the function if
provided.
sanity_check : bool
Check the validity of the loaded tensor
Check the validity of the loaded tensor. Can slow down the function.
Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions data/output/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Loading

0 comments on commit 11c6279

Please sign in to comment.