Skip to content
Snippets Groups Projects
Commit 4c26e885 authored by Andrey Aristov's avatar Andrey Aristov
Browse files

replace read function

parent 0b08d8ff
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ import os ...@@ -3,7 +3,7 @@ import os
import numpy as np import numpy as np
import pandas as pd import pandas as pd
from segment import seg from segment import seg
from nd2_combine import tools import nd2
from functools import partial from functools import partial
import logging import logging
import click import click
...@@ -62,7 +62,7 @@ def check_paths(paths:list): ...@@ -62,7 +62,7 @@ def check_paths(paths:list):
def process(path:str='', out_dir_suffix:str='', len_range_px:tuple=(50,500), logger=logging, cpu: int = 1): def process(path:str='', out_dir_suffix:str='', len_range_px:tuple=(50,500), logger=logging, cpu: int = 1):
logger.info(f'Processing {path}') logger.info(f'Processing {path}')
logger.debug(f'len_range_px = {len_range_px}') logger.debug(f'len_range_px = {len_range_px}')
reader = tools.read_nd2(path) reader = nd2.ND2File(path).asarray()
dirr = create_results_dir(path, suffix=out_dir_suffix) dirr = create_results_dir(path, suffix=out_dir_suffix)
pfun = partial(seg.crop_and_segment, dirr=dirr, lim_major_axis_length=len_range_px, print_dot=True) pfun = partial(seg.crop_and_segment, dirr=dirr, lim_major_axis_length=len_range_px, print_dot=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment