2. Astec Tutorial¶
2.1. Tutorial installation¶
Requires git.
Astec tutorial can be found at gitlab.inria.fr/astec/astec-tutorial. It can be downloaded with
git clone https://gitlab.inria.fr/astec/astec-tutorial.git
2.2. Tutorial data¶
The directory /path/to/astec-tutorial/
, also denoted by
path/to/experiment/
or <EXPERIMENT>
, contains
the RAWDATA/
and parameters/
sub-directories and a
README
file
/path/to/astec-tutorial/
├── data/
│ ├── LC/
│ │ └── ...
│ └── RC/
│ └── ...
├── ...
├── parameters
│ └── ...
...
The data/
contains 21 time points (indexed from 0 to 20)
of subsampled (for file size
consideration) raw data from a 3D+t movie acquired by a MuViSPIM microscope.
/path/to/experiment/
├── data/
│ ├── LC/
│ │ ├── Stack0000/
│ │ │ ├── Time000000_00.mha.gz
│ │ │ ├── ...
│ │ │ └── Time000020_00.mha.gz
│ │ └── Stack0001/
│ │ ├── Time000000_00.mha.gz
│ │ ├── ...
│ │ └── Time000020_00.mha.gz
│ └── RC/
│ ├── Stack0000/
│ │ ├── Time000000_00.mha.gz
│ │ ├── ...
│ │ └── Time000020_00.mha.gz
│ └── Stack0001/
│ ├── Time000000_00.mha.gz
│ ├── ...
│ └── Time000020_00.mha.gz
...
where LC/
and LC/
stand respectively for the left
and the right cameras.
2.2.1. Fusion¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Running the fusion is
done with astec_fusion
$ astec_fusion -p parameters/1-fuse-tutorial-parameters.py
1-fuse-tutorial-parameters.py
being the dedicated parameter file (listing Listing 2.1).
1PATH_EMBRYO = '.'
2
3EN = '2019-Tutorial100'
4
5begin = 0
6end = 20
7
8DIR_RAWDATA = 'data'
9DIR_LEFTCAM_STACKZERO = 'LC/Stack0000'
10DIR_RIGHTCAM_STACKZERO = 'RC/Stack0000'
11DIR_LEFTCAM_STACKONE = 'LC/Stack0001'
12DIR_RIGHTCAM_STACKONE = 'RC/Stack0001'
13
14acquisition_orientation = 'right'
15acquisition_mirrors = False
16acquisition_resolution = (1., 1., 1.)
17
18target_resolution = 1.0
The variable
PATH_EMBRYO
is the path to the directory where the directorydata/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the result fusion images will be named.The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.The variable
DIR_RAWDATA
is the directory containing the raw data.The variables
DIR_LEFTCAM_STACKZERO
,DIR_RIGHTCAM_STACKZERO
,DIR_LEFTCAM_STACKONE
andDIR_RIGHTCAM_STACKONE
set the sub-directories of thedata/
directory, where the 4 acquisitions of the SPIM microscope are located.The variables
acquisition_orientation
andacquisition_mirrors
are parameters describing the acquisition geometry.The variable
acquisition_resolution
is the voxel size (along the 3 dimensions X, Y and Z).The variable
target_resolution
is the desired isotropic (the same along the 3 dimensions) voxel size for the result fusion images.
After processing, a FUSE/
directory has been created
/path/to/astec-tutorial/
├── FUSE/
├── data/
├── ...
├── parameters
...
The FUSE/
directory contains
FUSE/
└── FUSE_RELEASE/
├── 2019-Tutorial100_fuse_t000.mha
├── ...
├── 2019-Tutorial100_fuse_t020.mha
└── LOGS/
The fused images are named after <EN>_fuse\t<XXX>.mha
(where <XXX>
denotes the value of the variable XXX
) and
indexed from <begin>
to <end>
(as the input data).
The directory LOGS/
contains
a copy of the parameter file (stamped with date and hour) as well as a
log file (also stamped with date and hour) reporting information about
the processing.
2.2.2. Sequence intra-registration (or drift/motion compensation) [1]¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Running the sequence
intra-registration
is done with
$ astec_intraregistration -p
parameters/1.5-intraregistration-tutorial-parameters-fuse.py
1.5-intraregistration-tutorial-parameters-fuse.py
being the
dedicated parameter file
(listing Listing 2.2).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.- The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.
- The variables
After processing, a INTRAREG/
directory has been created
/path/to/astec-tutorial/
├── FUSE/
├── INTRAREG/
├── data/
├── ...
├── parameters
...
The INTRAREG/
directory contains
INTRAREG/
└── INTRAREG_RELEASE/
├── CO-TRSFS/
│ ├── 2019-Tutorial100_intrareg_flo000_ref001.trsf
│ ├── ...
│ └── 2019-Tutorial100_intrareg_flo019_ref020.trsf
├── FUSE/
│ └── FUSE_RELEASE/
│ ├── 2019-Tutorial100_intrareg_fuse_t000.mha
│ ├── ...
│ └── 2019-Tutorial100_intrareg_fuse_t020.mha
├── LOGS/
├── MOVIES/
│ └── FUSE/
│ └── FUSE_RELEASE/
│ └── 2019-Tutorial100_intrareg_fuse_t000-020_xy0205.mha
├── TRSFS_t0-20/
│ ├── 2019-Tutorial100_intrareg_t000.trsf
│ ├── ...
│ ├── 2019-Tutorial100_intrareg_t020.trsf
│ └── template_t0-20.mha
├── ...
├── 2019-Tutorial100_fuse_t020.mha
└── LOGS/
The directory
CO-TRSF/
contains the co-registration transformations.The directory
FUSE/FUSE_RELEASE/
contains the resampled fused images in the same geometry (images have the same dimensions along X, Y and Z), with drift compensation (the eventual motion of the sample under the microscope has been compensated).The directory
MOVIES/FUSE/FUSE_RELEASE/
contains a 3D (which is a 2D+t) image, here2019-Tutorial100_intrareg_fuse_t000-020_xy0205.mha
, which the #205 XY-section of the resampled fused images for all the time points.The directory
TRSFS/
contains the transformation of every fused image towards the reference one as well as the template image (an image large enough to including each fused images after resampling).The template image
template_t0-20.mha
is of size \(422 \times 365 \times 410\) with a voxel size of 0.6 (the voxel size can be set by the variableintra_registration_resolution
).
2.2.3. Segmentation of the first time point¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Segmenting the first
time point is
done with
$ astec_mars -p parameters/2-mars-tutorial-parameters.py
2-mars-tutorial-parameters.py
being the
dedicated parameter file (listing Listing 2.3).
1PATH_EMBRYO = '.'
2
3EN = '2019-Tutorial100'
4
5begin = 0
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variable
begin
sets the index of the first input time point (to be processed).
After processing, a SEG/
directory has been created
/path/to/astec-tutorial/
├── FUSE/
├── INTRAREG/
├── SEG/
├── data/
├── ...
├── parameters
...
The SEG/
directory contains
SEG/
└── SEG_RELEASE/
├── 2019-Tutorial100_mars_t000.mha
└── LOGS/
2019-Tutorial100_mars_t000.mha
is the segmented firsttime point of the sequence.
2.2.4. Correction of the first time point segmentation¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Correcting the first
time point segmentation is
done with
$ astec_manualcorrection -p parameters/3-manualcorrection-tutorial-parameters.py
3-manualcorrection-tutorial-parameters.py
being the
dedicated parameter file
(listing Listing 2.4).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6
7 mancor_mapping_file='parameters/3-manualcorrection-tutorial.txt'
14 9
210 6
320 13
423 30
512 21
640 29
741 37
851 42
945 44
1057 61
1159 62
1265 66
1365 74
1478 67
1572 76
1677 82
1783 75
The variable
PATH_EMBRYO
is the path to the directory where the directorySEG/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variable
begin
set the index of the first input time point (to be processed).The variable
mancor_mapping_file
gives the file name containing the correction to be applied.
After processing, the SEG/
directory contains
SEG/
└── SEG_RELEASE/
├── 2019-Tutorial100_mars_t000.mha
├── 2019-Tutorial100_seg_t000.mha
├── LOGS/
└── RECONSTRUCTION/
2019-Tutorial100_seg_t000.mha
is the corrected version of
the segmentation obtained at the previous step.
2.2.5. Segmentation propagation¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Segmenting the first
time point is
done with
$ astec_astec -p parameters/4-astec-tutorial-parameters.py
4-astec-tutorial-parameters.py
being the
dedicated parameter file
(listing Listing 2.6).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 result_lineage_suffix = 'pkl'
After processing, the SEG/
directory contains
SEG/
└── SEG_RELEASE/
├── 2019-Tutorial100_mars_t000.mha
├── 2019-Tutorial100_seg_lineage.pkl
├── 2019-Tutorial100_seg_t000.mha
├── 2019-Tutorial100_seg_t001.mha
├── ...
├── 2019-Tutorial100_seg_t020.mha
├── LOGS/
└── RECONSTRUCTION/
2019-Tutorial100_seg_lineage.pkl
is a pickle python file
containing a dictionary (in the python sense). It can be read by
$ python
...
>>> import pickle as pkl
>>> f = open('2019-Tutorial100_seg_lineage.pkl', 'r')
>>> d = pkl.load(f)
>>> f.close()
>>> d.keys()
['cell_lineage', 'cell_volume']
In this pickle file, cells have an unique identifier \(i * 1000 + c\), which is made of both the image index \(i\) and the cell identifier \(c\) within a segmentation image (recall that, within an image, cells are numbered from 2, 1 being the background label).
2.2.6. Sequence intra-registration (or drift/motion compensation) [2]¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Running the sequence intra-registration is
done with
$ astec_intraregistration -p parameters/1.5-intraregistration-tutorial-parameters-seg.py
1.5-intraregistration-tutorial-parameters-seg.py
being the
dedicated parameter file
(listing Listing 2.7).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 EXP_INTRAREG = 'SEG'
9
10 intra_registration_template_type = "SEGMENTATION"
11 intra_registration_template_threshold = 2
12 intra_registration_margin = 20
13
14 intra_registration_resample_segmentation_images = True
15 intra_registration_movie_segmentation_images = True
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.the variable
EXP_INTRAREG
set the suffix of the sub-directory of theINTRAREG/
directory to be created.the variable
intra_registration_template_type
set the images to be used to build the template. Here, since it is equal to'SEGMENTATION'
, they are the segmentation images obtained at the previous step.The variable
intra_registration_template_threshold
set a threshold to be applied to the template images to define the information to be kept: we want all the points with a value equal or greater than 2 to be contained in the template after resampling. Since cells are labeled from 2 and above, the template is designed to contain all labeled cells after resampling, so it is built as small as possible.The variable
intra_registration_margin
allows to add margins (in the 3 dimensions) to the built template.The variable
intra_registration_resample_segmentation_images
indicates whether the segmentation images are to be resampled in the template geometry.The variable
intra_registration_movie_segmentation_images
indicates whether 2D+t movies have to be built from the resampled segmentation images.
After processing, a INTRAREG/INTRAREG_SEG/
directory has
been created and the INTRAREG/
directory now contains
INTRAREG/
├── INTRAREG_RELEASE/
└── INTRAREG_SEG/
├── CO-TRSFS/
│ ├── 2019-Tutorial100_intrareg_flo000_ref001.trsf
│ ├── ...
│ └── 2019-Tutorial100_intrareg_flo019_ref020.trsf
├── FUSE/
│ └── FUSE_RELEASE/
│ ├── 2019-Tutorial100_intrareg_fuse_t000.mha
│ ├── ...
│ └── 2019-Tutorial100_intrareg_fuse_t020.mha
├── LOGS/
├── MOVIES/
│ ├── FUSE/
│ │ └── FUSE_RELEASE/
│ │ └── 2019-Tutorial100_intrareg_fuse_t000-020_xy174.mha
│ └── SEG/
│ └── SEG_RELEASE/
│ └── 2019-Tutorial100_intrareg_seg_t000-020_xy174.mha
├── SEG/
│ └── SEG_RELEASE/
│ ├── 2019-Tutorial100_intrareg_seg_t000.mha
│ ├── ...
│ └── 2019-Tutorial100_intrareg_seg_t020.mha
├── TRSFS_t0-20/
│ ├── 2019-Tutorial100_intrareg_t000.trsf
│ ├── ...
│ ├── 2019-Tutorial100_intrareg_t020.trsf
│ └── template_t0-20.mha
├── ...
└── LOGS/
In addition to directories already described in section
Sequence intra-registration (or drift/motion compensation) [1], the INTRAREG_SEG/
directory contains
The directory
SEG/SEG_RELEASE
contains the resampled segmentation images in the same geometry (images have the same dimensions along X, Y and Z), with drift compensation (the eventual motion of the sample under the microscope has been compensated).In addition to a 2D+t movie made from the resampled fusion images, the directory
MOVIES/
contains a 2D+t movie made from the resampled segmentation images in the sub-directorySEG/SEG_RELEASE
.The template image
template_t0-20.mha
in the directoryTRSFS/
is now of size \(323 \times 265 \times 348\) with a voxel size of 0.6, which is smaller than the one computed in section Sequence intra-registration (or drift/motion compensation) [1], even with the added margins.Note that all resampled images (in both the
FUSE/FUSE_RELEASE
and theSEG/SEG_RELEASE
directories have the same geometry than the template image.
2.2.7. Sequence properties computation [1]¶
We assume that we are located in the directory
/path/to/astec-tutorial/
.
Computing cell properties as well as lineage assumes that
segmentation or post-corrected segmentation (see section
Sequence properties computation [2]) images have been
co-registered (see sections Sequence intra-registration (or drift/motion compensation) [2]
and Sequence intra-registration (or drift compensation) [3]).
Extracting the sequence properties from the co-registered segmentation
images is
done with
$ astec_embryoproperties -p parameters/X-embryoproperties-tutorial-parameters-seg.py
X-embryoproperties-tutorial-parameters-seg.py
being the
dedicated parameter file
(listing Listing 2.8).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 EXP_INTRAREG = 'SEG'
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.the variable
EXP_INTRAREG
set the suffix of the sub-directory of theINTRAREG/
directory where to search post-corrected segmentation or segmentation images.Since the directory
INTRAREG/INTRAREG_SEG/
only contains the co-registered segmentation images (in theSEG/SEG_RELEASE/
sub-directory), properties will be computed from these images.
After processing, some files appears in the INTRAREG/INTRAREG_SEG/SEG/SEG_RELEASE/
sub-directory
INTRAREG/
├── INTRAREG_RELEASE/
└── INTRAREG_SEG/
├── CO-TRSFS/
│ └── ...
├── FUSE/
│ └── ...
├── LOGS/
├── MOVIES/
│ └── ...
├── SEG/
│ └── SEG_RELEASE/
│ ├── 2019-Tutorial100_intrareg_seg_lineage.pkl
│ ├── 2019-Tutorial100_intrareg_seg_lineage.tlp
│ ├── 2019-Tutorial100_intrareg_seg_lineage.txt
│ ├── 2019-Tutorial100_intrareg_seg_lineage.xml
│ ├── 2019-Tutorial100_intrareg_seg_t000.mha
│ ├── ...
│ └── 2019-Tutorial100_intrareg_seg_t020.mha
├── TRSFS_t0-20/
│ └── ...
├── ...
└── LOGS/
2019-Tutorial100_intrareg_seg_lineage.pkl
is a pickle python file
containing a dictionary (in the python sense). It can be read by
$ python
...
>>> import pickle as pkl
>>> f=open('2019-Tutorial100_intrareg_seg_lineage.pkl', 'r')
>>> d = pkl.load(f)
>>> f.close()
>>> d.keys()
['all_cells', 'cell_barycenter', 'cell_contact_surface', 'cell_principal_vectors', 'cell_principal_values', 'cell_volume', 'cell_compactness', 'cell_surface', 'cell_lineage']
In this pickle file (as in the one computed at section Segmentation propagation), cells have an unique identifier \(i * 1000 + c\), which is made of both the image index \(i\) and the cell identifier \(c\) within a segmentation image (recall that cells are numbered from 2, 1 being the background label).
2019-Tutorial100_intrareg_seg_lineage.xml
contains the
same information than the pickle file, but in xml format (see figure
ref{fig:tutorial:seg:properties:xml}).
<data>
<cell_volume>
...
</cell_volume>
<cell_surface>
...
</cell_surface>
<cell_compactness>
...
</cell_compactness>
<cell_barycenter>
...
</cell_barycenter>
<cell_principal_values>
...
</cell_principal_values>
<cell_principal_vectors>
...
</cell_principal_vectors>
<cell_contact_surface>
...
</cell_contact_surface>
<all_cells>[2, 3, 4, 5, 6, 7, 8, 11, 12, 13,
...
200097, 200099, 200100, 200101, 200102]</all_cells>
<cell_lineage>
...
</cell_lineage>
</data>
2019-Tutorial100_intrareg_seg_lineage.tst
contains some
diagnosis information (smallest and largest cells, weird
lineages, etc.).
2.2.8. Segmentation post-correction¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Segmentation post-correction is
done with
$ astec_postcorrection -p parameters/5-postcorrection-tutorial-parameters.py
5-postcorrection-tutorial-parameters.py
being the
dedicated parameter file (figure parameter file for the segmentation post-correction.).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 result_lineage_suffix = 'pkl'
After processing, a POST/
directory has been created
/path/to/astec-tutorial/
├── FUSE/
├── INTRAREG/
├── SEG/
├── POST/
├── data/
├── ...
├── parameters
...
The POST/
directory contains
POST/
└── POST_RELEASE/
├── 2019-Tutorial100_post_lineage.pkl
├── 2019-Tutorial100_post_t000.mha
├── ...
├── 2019-Tutorial100_post_t020.mha
└── LOGS/
2.2.9. Sequence intra-registration (or drift compensation) [3]¶
We assume that we are located in the directory
/path/to/astec-tutorial/
. Running the sequence intra-registration is
done with
$ astec_intraregistration -p parameters/1.5-intraregistration-tutorial-parameters-post.py
1.5-intraregistration-tutorial-parameters-post.py
being the
dedicated parameter file (figure parameter file for the motion compensation step, post-segmentation images being used to build the template.).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 EXP_INTRAREG = 'SEG'
9
10 intra_registration_template_type = "POST-SEGMENTATION"
11 intra_registration_template_threshold = 2
12 intra_registration_margin = 20
13
14 intra_registration_resample_segmentation_images = True
15 intra_registration_movie_segmentation_images = True
16 intra_registration_movie_post_segmentation_images = True
17 intra_registration_movie_segmentation_images = True
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.the variable
EXP_INTRAREG
set the suffix of the sub-directory of theINTRAREG/
directory to be created.the variable
intra_registration_template_type
set the images to be used to build the template. Here, since it is equal to"POST-SEGMENTATION''
, they are the post-corrected segmentation images obtained at the previous step.The variable
intra_registration_template_threshold
set a threshold to be applied to the template images to define the information to be kept: we want all the points with a value equal or greater than 2 to be contained in the template after resampling. Since cells are labeled from 2 and above, the template is designed to contain all labeled cells after resampling, so it is built as small as possible.The variable
intra_registration_margin
allows to add margins (in the 3 dimensions) to the built template.The variable
intra_registration_resample_post_segmentation_images
indicates whether the post-corrected segmentation images are to be resampled in the template geometry.The variable
intra_registration_resample_segmentation_images
indicates whether the segmentation images are to be resampled in the template geometry.The variable
intra_registration_movie_post_segmentation_images
indicates whether 2D+t movies have to be built from the resampled post-corrected segmentation images.The variable
intra_registration_movie_segmentation_images
indicates whether 2D+t movies have to be built from the resampled segmentation images.
After processing, a INTRAREG/INTRAREG_POST/
directory has
been created and the INTRAREG/
directory now contains
INTRAREG/
├── INTRAREG_RELEASE/
├── INTRAREG_POST/
│ ├── CO-TRSFS/
│ │ ├── 2019-Tutorial100_intrareg_flo000_ref001.trsf
│ │ ├── ...
│ │ └── 2019-Tutorial100_intrareg_flo019_ref020.trsf
│ ├── FUSE/
│ │ └── FUSE_RELEASE/
│ │ ├── 2019-Tutorial100_intrareg_fuse_t000.mha
│ │ ├── ...
│ │ └── 2019-Tutorial100_intrareg_fuse_t020.mha
│ ├── LOGS/
│ ├── MOVIES/
│ │ ├── FUSE/
│ │ │ └── FUSE_RELEASE/
│ │ │ └── 2019-Tutorial100_intrareg_fuse_t000-020_xy174.mha
│ │ ├── POST/
│ │ │ └── POST_RELEASE/
│ │ │ └── 2019-Tutorial100_intrareg_post_t000-020_xy174.mha
│ │ └── SEG/
│ │ └── SEG_RELEASE/
│ │ └── 2019-Tutorial100_intrareg_seg_t000-020_xy174.mha
│ ├── POST/
│ │ └── POST_RELEASE/
│ │ ├── 2019-Tutorial100_intrareg_post_t000.mha
│ │ ├── ...
│ │ └── 2019-Tutorial100_intrareg_pst_t020.mha
│ ├── SEG/
│ │ └── SEG_RELEASE/
│ │ ├── 2019-Tutorial100_intrareg_seg_t000.mha
│ │ ├── ...
│ │ └── 2019-Tutorial100_intrareg_seg_t020.mha
│ ├── TRSFS_t0-20/
│ │ ├── 2019-Tutorial100_intrareg_t000.trsf
│ │ ├── ...
│ │ ├── 2019-Tutorial100_intrareg_t020.trsf
│ │ └── template_t0-20.mha
│ ├── ...
│ └── LOGS/
├── INTRAREG_RELEASE/
│ └── ...
└── INTRAREG_SEG/
└── ...
In addition to directories already described in sections
Sequence intra-registration (or drift/motion compensation) [1] and
Sequence intra-registration (or drift/motion compensation) [2],
the INTRAREG_POST/
directory contains
The directory
POST/POST_RELEASE/
contains the resampled post-corrected segmentation images in the same geometry (images have the same dimensions along X, Y and Z), with drift compensation (the eventual motion of the sample under the microscope has been compensated).In addition to a 2D+t movie made from the resampled fusion and the segmentation images, the directory
MOVIES/
contains a 2D+t movie made from the resampled post-corrected segmentation images in the sub-directoryPOST/POST_RELEASE/
.The template image
template_t0-20.mha
in the directoryTRSFS/
is of size \(323 \times 265 \times 348\) with a voxel size of 0.6, has the same size than the one computed in section Sequence intra-registration (or drift/motion compensation) [2], which is expected since the post-correction does not change the background. Note that all resampled images (in theFUSE/FUSE_RELEASE/
, thePOST/POST_RELEASE/
, and theSEG/SEG_RELEASE/
directories have the same geometry than the template image.
2.2.10. Sequence properties computation [2]¶
We assume that we are located in the directory
/path/to/astec-tutorial/
.
Computing cell properties as well as lineage assumes that
segmentation or post-corrected segmentation (see section
Segmentation post-correction}) images have been
co-registered (see sections Sequence intra-registration (or drift/motion compensation) [1] and
Sequence intra-registration (or drift/motion compensation) [2]).
Extracting the sequence properties from the co-registered segmentation
images is
done with
$ astec_embryoproperties -p parameters/X-embryoproperties-tutorial-parameters-post.py
X-embryoproperties-tutorial-parameters-post.py
being the
dedicated parameter file
(listing Listing 2.12).
1 PATH_EMBRYO = '.'
2
3 EN = '2019-Tutorial100'
4
5 begin = 0
6 end = 20
7
8 EXP_INTRAREG = 'POST'
The variable
PATH_EMBRYO
is the path to the directory where the directoryFUSE/
is located. It can be either relative (as in the above example) or global (it could have been/path/to/astec-tutorial/
).The variable
EN
is the prefix after which the images are named.The variables
begin
andend
set respectively the first and the last index of the input time points to be processed.the variable
EXP_INTRAREG
set the suffix of the sub-directory of theINTRAREG/
directory where to search post-corrected segmentation or segmentation images.Since the directory
INTRAREG/INTRAREG_POST/
contains the co-registered post-corrected segmentation images (in thePOST/POST_RELEASE/
sub-directory), properties will be computed from these images preferably to the co-registered segmentation images (in theSEG/SEG_RELEASE/
sub-directory).
After processing, some files appears in the INTRAREG/INTRAREG_POST/POST/
sub-directory
INTRAREG/
├── INTRAREG_POST/
│ ├── CO-TRSFS/
│ │ └── ...
│ ├── FUSE/
│ │ └── ...
│ ├── LOGS/
│ ├── MOVIES/
│ │ └── ...
│ ├── POST/
│ │ └── POST_RELEASE/
│ │ ├── 2019-Tutorial100_intrareg_post_lineage.pkl
│ │ ├── 2019-Tutorial100_intrareg_post_lineage.tlp
│ │ ├── 2019-Tutorial100_intrareg_post_lineage.txt
│ │ ├── 2019-Tutorial100_intrareg_post_lineage.xml
│ │ ├── 2019-Tutorial100_intrareg_post_t000.mha
│ │ ├── ...
│ │ └── 2019-Tutorial100_intrareg_post_t020.mha
│ ├── SEG/
│ ├── TRSFS_t0-20/
│ │ └── ...
│ ├── ...
│ └── LOGS/
├── INTRAREG_RELEASE/
│ └── ...
└── INTRAREG_SEG/
└── ...
Those files have the same content than the ones already presented in section Sequence properties computation [1].