Wiki
Version 48 (Annamaria Kiss, 18/05/2022 15:40)
1 | 18 | Annamaria Kiss | *Table of contents* |
---|---|---|---|
2 | 17 | Annamaria Kiss | |
3 | 17 | Annamaria Kiss | {{TOC}} |
4 | 17 | Annamaria Kiss | |
5 | 38 | Annamaria Kiss | Pipeline to detect, orient and measure sepals. The pipeline is based on different type of scripts that we developed and can be found in this repository. |
6 | 37 | Annamaria Kiss | - image type transformations are done with "ImageJ":https://imagej.net/Welcome macros |
7 | 37 | Annamaria Kiss | - python scripts making use of "MorphoGraphX":https://morphographx.org/ |
8 | 37 | Annamaria Kiss | - python scripts that make use of "TimageTk":https://mosaic.gitlabpages.inria.fr/timagetk/ |
9 | 1 | Annamaria Kiss | |
10 | 30 | Annamaria Kiss | h2. 1. Preliminaries |
11 | 1 | Annamaria Kiss | |
12 | 46 | Annamaria Kiss | You will need to change different image file formats to .tif format. For this purpose, you have suitable ImageJ macros in this repository's _bin/ImageJ_ folder : lif2tif, lsm2tif, inr2tif, tif2tif. Their usage is the same. Lounch the macro and select the directory, where the files to transform are ; a new directory with the output tif files is created. |
13 | 20 | Annamaria Kiss | |
14 | 46 | Annamaria Kiss | Recall how to install a macro in ImageJ: Plugins → Macros → Install → macroname.ijm |
15 | 20 | Annamaria Kiss | |
16 | 46 | Annamaria Kiss | |
17 | 1 | Annamaria Kiss | |
18 | 14 | Annamaria Kiss | h2. 2. Normalise images |
19 | 10 | Annamaria Kiss | |
20 | 48 | Annamaria Kiss | <pre>usage: normalise.py imagefolder 30 |
21 | 48 | Annamaria Kiss | |
22 | 47 | Annamaria Kiss | positional arguments: |
23 | 47 | Annamaria Kiss | imagefolder folder containing the images to normalise (.tif format) |
24 | 47 | Annamaria Kiss | 30 common Otsu value |
25 | 47 | Annamaria Kiss | </pre> |
26 | 1 | Annamaria Kiss | |
27 | 19 | Annamaria Kiss | h2. 3. Detect the contour |
28 | 1 | Annamaria Kiss | |
29 | 31 | Annamaria Kiss | Use the MGX_EdgeDetect.py script on MorphoGraphX: |
30 | 31 | Annamaria Kiss | - open the script file with a texteditor; |
31 | 31 | Annamaria Kiss | - put the path to the directory of grey sepal images (line 13) |
32 | 31 | Annamaria Kiss | - save the script file |
33 | 31 | Annamaria Kiss | - drag and drop the script file on the MorphoGraphX black window |
34 | 31 | Annamaria Kiss | |
35 | 39 | Annamaria Kiss | *Remark:* |
36 | 40 | Annamaria Kiss | Before you lounch the scrcipt the first time in a session, you need to do a clicks on MorphographX: |
37 | 39 | Annamaria Kiss | -> Process -> System -> set current stack -> Both + double click on Set current stack |
38 | 31 | Annamaria Kiss | |
39 | 1 | Annamaria Kiss | |
40 | 19 | Annamaria Kiss | h2. 4. Orient sepals |
41 | 1 | Annamaria Kiss | |
42 | 1 | Annamaria Kiss | cd in the folder containing the contours folder and type |
43 | 1 | Annamaria Kiss | <pre>orient_sepals.sh contours filetype</pre> |
44 | 1 | Annamaria Kiss | contours = folder name containing the contours |
45 | 1 | Annamaria Kiss | filetype = '.tif' or '.inr.gz' |
46 | 1 | Annamaria Kiss | the oriented sepals are written in the "contours_oriented" folder |
47 | 1 | Annamaria Kiss | |
48 | 19 | Annamaria Kiss | h2. 5. Do measurements |
49 | 1 | Annamaria Kiss | |
50 | 32 | Annamaria Kiss | h3. 5.1. All but area measurements |
51 | 32 | Annamaria Kiss | |
52 | 1 | Annamaria Kiss | detected contours are in the folder « contours » |
53 | 7 | Annamaria Kiss | cd in the folder containing the oriented contours and type |
54 | 1 | Annamaria Kiss | <pre>measure_sepals.py foldername filetype</pre> |
55 | 1 | Annamaria Kiss | foldername = folder name containing the oriented contours |
56 | 1 | Annamaria Kiss | filetype = '.tif' or '.inr.gz' |
57 | 1 | Annamaria Kiss | the measurements are written in the "foldername_measures.csv" file |
58 | 32 | Annamaria Kiss | |
59 | 32 | Annamaria Kiss | h3. 5.2. Area measurements |
60 | 32 | Annamaria Kiss | |
61 | 32 | Annamaria Kiss | Use the MGX_CurvatureMapSegmentation.py script on MorphoGraphX: |
62 | 32 | Annamaria Kiss | - open the script file with a texteditor; |
63 | 32 | Annamaria Kiss | - put the path to the directory of sepal contours (line 13) |
64 | 32 | Annamaria Kiss | - save the script file |
65 | 32 | Annamaria Kiss | - drag and drop the script file on the MorphoGraphX black window |
66 | 32 | Annamaria Kiss | |
67 | 34 | Annamaria Kiss | The segmented meshes (abaxial and adaxial surfaces are treated as cells) as well as one csv file per sepal containing the surface areas are saved. |