Command line scripts

Automatic orientation of intensity image

Automatic orientation of object in images.

usage: orientation [-h] [--extra_channels EXTRA_CHANNELS [EXTRA_CHANNELS ...]]
                   [--regexp_channels REGEXP_CHANNELS]
                   [--out_suffix OUT_SUFFIX] [--format FORMAT]
                   [--output_path OUTPUT_PATH]
                   [--log_level {ERROR,WARNING,NOTSET,CRITICAL,DEBUG,INFO}]
                   images [images ...]

Positional Arguments

images

list of images filename to orient.

Extra channels options

--extra_channels

list of extra channels to orient, limit to one image as first argument!.

--regexp_channels

the position of the variable character in file names to define extra-channel.

output arguments

--out_suffix

suffix to add to the file prior to saving.

Default: “-auto_rotated”

--format

if specified, may change the output image format.

--output_path

if specified, change the output path.

logging arguments

--log_level

Possible choices: ERROR, WARNING, NOTSET, CRITICAL, DEBUG, INFO

logging level to use, ‘INFO’ by default.

Default: “INFO”

Orient the object along its main axes.

Image resampling

Resampling an image allow to change its voxelsize and shape using interpolation methods while preserving the image physical extent.

usage: resampling [-h] [--label | --linear] [-p OUTPUT_PATH] [-f FORMAT]
                  [-r REPLACE REPLACE]
                  [--log_level {ERROR,WARNING,NOTSET,CRITICAL,DEBUG,INFO}]
                  images [images ...] voxelsize [voxelsize ...]

Positional Arguments

images

image or list of images to resample.

voxelsize

voxelsize or list voxelsize for each axis.

Named Arguments

--label

use it to resample labelled images, change the interpolation method to ‘nearest’.

Default: False

--linear

use it with intensity images, change the interpolation method to ‘linear’ instead of ‘cubic-spline’.

Default: False

output arguments

-p, --output_path

if specified, change the output path. Make sure it is empty as it could overwrite the files!

-f, --format

if specified, change the output image format.

-r, --replace

if specified, replace the string in output image format.Should be made of two parts, the chain to replace and the replacement.

logging arguments

--log_level

Possible choices: ERROR, WARNING, NOTSET, CRITICAL, DEBUG, INFO

logging level to use, ‘INFO’ by default.

Default: “INFO”

Pay attention to the type of image you are interpolating, intensity or labelled, as it modify the information contained in the image depending on the selected method!

Multi-angle images manual landmarks definition

Manually place landmarks for multi-angles fusion initialisation.

usage: multiangle_initialisation [-h] [-d DATASET] [-t TIME_INDEX]
                                 [--channel CHANNEL] [-o OUT_DATASET]
                                 [--log_level {ERROR,WARNING,NOTSET,CRITICAL,DEBUG,INFO}]
                                 json

Positional Arguments

json

a JSON file containing the metadata and locations of the required dataset.

Named Arguments

-d, --dataset

the dataset to use as intensity image input for fusion algorithm, ‘raw’ by default.

Default: “raw”

-t, --time_index

the time-index of the multi-angles image used in fusion procedure, all of them by default.

Default: []

multichannel image arguments

--channel

channel to use with a multichannel image.

output arguments

-o, --out_dataset

the dataset name to use to save landmarks files, ‘multiangle_landmarks’ by default.

Default: “multiangle_landmarks”

logging arguments

--log_level

Possible choices: ERROR, WARNING, NOTSET, CRITICAL, DEBUG, INFO

logging level to use, ‘INFO’ by default

Default: “INFO”

Multi-angle images fusion

Performs multi-angle images registration and fusion

usage: multiangle_fusion [-h] [-d DATASET] [-t TIME_INDEX] [--manual_init]
                         [--n_iter N_ITER [N_ITER ...]]
                         [--average_method {mean,robust-mean,median,minimum,maximum,quantile,sum,var,stddev}]
                         [--super_resolution] [--global_averaging]
                         [--last_non_linear] [--py_ll PY_LL [PY_LL ...]]
                         [--channel CHANNEL] [--ext EXT]
                         [--out_dataset OUT_DATASET]
                         [--log_level {ERROR,WARNING,NOTSET,CRITICAL,DEBUG,INFO}]
                         json

Positional Arguments

json

a JSON file containing the metadata and locations of the required dataset.

Named Arguments

-d, --dataset

the dataset to use as intensity image input for multi-angles image fusion procedure, ‘raw’ by default.

Default: “raw”

-t, --time_index

the time-index of the multi-angles image used in fusion procedure, all of them by default.

Default: []

fusion arguments

--manual_init

add this option to use prior manual definition of landmarks with multiangle_initialisation.py.

Default: False

--n_iter

number of iterations to performs when fusing multi-angle images, default is 2.

Default: 2

--average_method

Possible choices: mean, robust-mean, median, minimum, maximum, quantile, sum, var, stddev

averaging method to use when fusing multi-angle images, default is mean.

Default: [‘mean’, ‘robust-mean’, ‘median’, ‘minimum’, ‘maximum’, ‘quantile’, ‘sum’, ‘var’, ‘stddev’]

--super_resolution

creates a super-resolution image when fusing multi-angle images at last step.

Default: False

--global_averaging

perform global averaging of each voxel by the total number of images, else use mask for local averaging.

Default: False

--last_non_linear

perform non-linear registration at last iteration step, else only rigid and affine registrations are used.

Default: False

--py_ll

use this to control the pyramid lowest level for block-matching, 2 by default.

Default: 2

multichannel image arguments

--channel

channel to use with a multichannel image.

output arguments

--ext

extension used to save fused images, ‘tif’ by default.

Default: “tif”

--out_dataset

export fused images in a ‘fusion’ dataset.

Default: “fusion”

logging arguments

--log_level

Possible choices: ERROR, WARNING, NOTSET, CRITICAL, DEBUG, INFO

logging level to use, ‘INFO’ by default.

Default: “INFO”

Sequence registration

Sequence registration of a time-series.

Sequence registration is a (temporal) forward registration of all images of a time series onto the last one. Use image I[t] (image at time t) as float and image I[N] as reference, with N the index of the last image of the temporal sequence. It allows to obtain a sequence fully registered on the same template, i.e. same image frame (shape, extent, …).

This tool will produce the following data:

  1. a series of sequence transformations allowing registration of I[t] onto I[N] frame (saved under the trsf_dataset location).

  2. a series of sequence registered images, that is I[t] registered onto I[N] frame (saved under the out_dataset location).

This tool will produce the following figure:

  1. a set of “original” projections for the time-series

  2. a set of “registered” projections for the time-series

Note that the “rigid” part of the transformations is always saved. Except for the figures, the produced data is automatically referenced in the JSON file.

usage: sequence_registration [-h] [-int INTENSITY_DATASET]
                             [-seg SEGMENTATION_DATASET] [-trsf TRSF_DATASET]
                             [--channel CHANNEL] [--orientation {1,-1}]
                             [--registration_type {similitude,rigid,affine,vectorfield}]
                             [--proj_method {contour,background,maximum,average,minimum,max,mean,min}]
                             [--ext EXT] [--out_dataset OUT_DATASET] [--force]
                             [--log_level {ERROR,WARNING,NOTSET,CRITICAL,DEBUG,INFO}]
                             json

Positional Arguments

json

a JSON file containing the metadata and locations of the required dataset.

Named Arguments

-int, --intensity_dataset

name of the dataset containing the intensity images, ‘raw’ by default.

Default: “raw”

-seg, --segmentation_dataset

the dataset containing the segmented image on which to project the dataset, ‘watershed_segmentation’ by default.

Default: “watershed_segmentation”

-trsf, --trsf_dataset

name of the dataset containing the transformations, ‘trsf’ by default.

Default: “trsf”

images arguments

--channel

channel to register, mandatory for multichannel images.

--orientation

Possible choices: 1, -1

image orientation, use -1 with an inverted microscope, 1 by default.

Default: 1

registration arguments

--registration_type

Possible choices: similitude, rigid, affine, vectorfield

type of registration to performs, ‘rigid’ by default.

Default: “rigid”

--force

force computation of transformations.

Default: False

figure arguments

--proj_method

Possible choices: contour, background, maximum, average, minimum, max, mean, min

projection method to use. ‘contour’ (default) works well with cell walls/membranes. ‘maximum’ works well with nuclei.

Default: “contour”

output arguments

--ext

file extension of registered images, ‘tif’ by default.

Default: “tif”

--out_dataset

export images in ‘temporal_registration’ dataset

Default: “temporal_registration”

logging arguments

--log_level

Possible choices: ERROR, WARNING, NOTSET, CRITICAL, DEBUG, INFO

logging level to use, ‘INFO’ by default.

Default: “INFO”

Temporal projection