convert, shrink, segment data from nd2 datasets
702
You can use local installation or Docker container
conda create -n nd2 python=3.8conda activate nd2pip install -U git+https://gitlab.pasteur.fr/aaristov/nd2shrink.gitpims. Download and install it from hereIf using Mac or Linux it's highly recommended using preconfigured Docker container.
In Windows Docker can't acceess remote volumes or Samba shares. But you can use it with local drives.
First, install Docker Desktop, register and login.
Open terminal and run
docker run -it -v /Volumes/Multicell:/Volumes/Multicell aaristov85/nd2tools
-it option makes shell interactive
-v /Volumes/Multicell:/Volumes/Multicell exposes local Multicell mount to the container with the same path. So, when you're inside the container, you can type python -m nd2tif and then drag and drop any nd2 file from your datasets. It will add a valid path the command line, press Enter and enjoy.
In principle, you can insert your command right after container initialization:
docker run -it -v /Volumes/Multicell:/Volumes/Multicell python -m nd2tif path_to_nd2
Remove -it option to run task in the background.
Package contains several independent modules
With binning and 16 to 8 bits conversion.
One position 'm' — one ImageJ-formatted tif stack with all channels and z planes.
python -m nd2tif path_to_nd2
Available options:
python -m nd2tif --help
Usage: __main__.py [OPTIONS] PATH
Options:
-b, --bin INTEGER Image binning [default: 4]
--to_8bits converto to 8 bits [default: False]
--log TEXT Logging level [default: info]
-s, --start INTEGER RANGE Start numbering from 000 or 001 [default: 0]
-p, --prefix TEXT Prefix for tif files [default: Pos_]
-c, --cpu INTEGER Number of CPU [default: 1]
--help Show this message and exit.
python -m nd2tif -b 4 --to_8bits -s 1 Folder/experiment.nd2
python -m nd2_combine path_to_folder
python -m segment dataset1.nd2 dataset2.nd2 ...
python -m segment --help
Usage: __main__.py [OPTIONS] [PATH]...
Options:
-o, --out_dir_suffix TEXT Where to save the preview png for
segmentation. [default: _segment]
-l, --len_range_px <INTEGER INTEGER>...
min, max length of major axis in pixels
[default: 50, 500]
--log TEXT Logging level [default: info]
--help Show this message and exit.
Content type
Image
Digest
Size
797 MB
Last updated
over 6 years ago
docker pull aaristov85/nd2tools