Mercurial > repos > mvdbeek > incucyte_stack_and_upload_omero_debug
annotate stack_buildXml.groovy @ 0:a599551e800d draft
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
author | mvdbeek |
---|---|
date | Tue, 06 Aug 2024 15:28:26 +0000 |
parents | |
children |
rev | line source |
---|---|
0
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
1 /* |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
2 **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
3 * Relative to the generation of the .companion.ome * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
4 **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
5 * #%L |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
6 * BSD implementations of Bio-Formats readers and writers |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
7 * %% |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
8 * The functions buildXML, makeImage, makePlate, postProcess and asString has been modified and adapted from |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
9 * https://github.com/ome/bioformats/blob/master/components/formats-bsd/test/loci/formats/utests/SPWModelMock.java |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
10 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
11 * Copyright (C) 2005 - 2015 Open Microscopy Environment: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
12 * - Board of Regents of the University of Wisconsin-Madison |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
13 * - Glencoe Software, Inc. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
14 * - University of Dundee |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
15 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
16 * @author Chris Allan <callan at blackcat dot ca> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
17 * %% |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
18 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
19 **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
20 * Relative to the rest of the script * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
21 **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
22 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
23 * * = AUTHOR INFORMATION = |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
24 * Code written by Rémy Dornier, EPFL - SV - PTECH - BIOP |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
25 * and Romain Guiet, EPFL - SV - PTECH - BIOP |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
26 * and Lucille Delisle, EPFL - SV - UPDUB |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
27 * and Pierre Osteil, EPFL - SV - UPDUB |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
28 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
29 * Last modification: 2023-12-19 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
30 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
31 * = COPYRIGHT = |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
32 * © All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, BioImaging And Optics Platform (BIOP), 2023 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
33 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
34 * Licensed under the BSD-3-Clause License: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
35 * Redistribution and use in source and binary forms, with or without modification, are permitted provided |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
36 * that the following conditions are met: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
37 * 1. Redistributions of source code must retain the above copyright notice, |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
38 * this list of conditions and the following disclaimer. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
39 * 2. Redistributions in binary form must reproduce the above copyright notice, |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
40 * this list of conditions and the following disclaimer |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
41 * in the documentation and/or other materials provided with the distribution. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
42 * 3. Neither the name of the copyright holder nor the names of its contributors |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
43 * may be used to endorse or promote products |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
44 * derived from this software without specific prior written permission. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
45 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
46 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
47 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
48 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
49 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
50 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
51 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
52 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
53 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
54 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
55 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
56 * POSSIBILITY OF SUCH DAMAGE. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
57 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
58 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
59 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
60 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
61 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
62 * The purpose of this script is to combine a series of time-lapse images into |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
63 * one file per well/field with possibly multiple channels and multiple time points |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
64 * and in addition create a .companion.ome file to create an OMERO plate object, |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
65 * with a single image per well/field. This .companion.ome file can be directly uploaded on OMERO via |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
66 * OMERO.insight software or CLI, with screen import option. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
67 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
68 * To make the script run |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
69 * 1. Create a parent folder (base_dir) and a output folder (output_dir) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
70 * 2. Create a dir *Phase, *Green, *Red with the corresponding channels |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
71 * 3. The image names must contains a prefix followed by '_', the name of the well (no 0-pad) followed by '_', followed by the field id followed by '_', the date of the acquisition in YYYYyMMmDDdHHhMMm and the extension '.tif' |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
72 * 4. The images can be either regular tif or the raw tif from Incucyte which contains multiple series. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
73 * 5. You must provide the path of the Incucyte XML file to populate key values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
74 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
75 * The expected outputs are: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
76 * 1. In the output_dir one tiff per well/field (multi-T and potentially multi-C) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
77 * 2. In the output_dir a .companion.ome |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
78 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
79 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
80 #@ File(style="directory", label="Directory with up to 3 subdirectories ending by Green, Phase and/or Red") base_dir |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
81 #@ File(label="Incucyte XML File (plateMap)") incucyteXMLFile |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
82 #@ File(style="directory", label="Output directory (must exist)") output_dir |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
83 #@ String(label="Final XML file name", value="Test") xmlName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
84 #@ String(label="Number of well in plate", choices={"96", "384"}, value="96") nWells |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
85 #@ Integer(label="Maximum number of images per well", value=1, min=1) n_images_per_well |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
86 #@ String(label="Objective", choices={"4x","10x","20x"}) objectiveChoice |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
87 #@ String(label="Plate name", value="Experiment:0") plateName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
88 #@ String(label="common Key Values formatted as key1=value1;key2=value2", value="") commonKeyValues |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
89 #@ Boolean(label="Ignore Compound concentration from plateMap", value=true) ignoreConcentration |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
90 #@ Boolean(label="Ignore Cell passage number from plateMap", value=true) ignorePassage |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
91 #@ Boolean(label="Ignore Cell seeding concentration from plateMap", value=true) ignoreSeeding |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
92 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
93 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
94 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
95 * ***************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
96 * ********************************************* Final Variables ************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
97 * ********************************************* DO NOT MODIFY **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
98 * **************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
99 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
100 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
101 /** objectives and respective pixel sizes */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
102 objective = 0 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
103 objectives = new String[]{"4x", "10x", "20x"} |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
104 pixelSizes = new double[]{2.82, 1.24, 0.62} |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
105 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
106 /** pattern for date */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
107 REGEX_FOR_DATE = ".*_([0-9]{4})y([0-9]{2})m([0-9]{2})d_([0-9]{2})h([0-9]{2})m.tif" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
108 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
109 ALTERNATIVE_REGEX_FOR_DATE = ".*_([0-9]{2})d([0-9]{2})h([0-9]{2})m.tif" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
110 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
111 /** Image properties keys */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
112 DIMENSION_ORDER = "dimension_order" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
113 FILE_NAME = "file_name" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
114 IMG_POS_IN_WELL = "img_pos_in_well" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
115 FIRST_ACQUISITION_DATE = "acquisition_date" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
116 FIRST_ACQUISITION_TIME = "acquisition_time" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
117 RELATIVE_ACQUISITION_HOUR = "relative_acquisition_hour" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
118 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
119 /** global variable for index to letter conversion */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
120 LETTERS = new String("ABCDEFGHIJKLMNOP") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
121 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
122 // Version number = date of last modif |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
123 VERSION = "20231219" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
124 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
125 /** Key-Value pairs namespace */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
126 GENERAL_ANNOTATION_NAMESPACE = "openmicroscopy.org/omero/client/mapAnnotation" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
127 annotations = new StructuredAnnotations() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
128 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
129 /** Plate details and conventions */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
130 PLATE_ID = "Plate:0" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
131 PLATE_NAME = plateName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
132 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
133 if (nWells == "96") { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
134 nRows = 8 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
135 nCols = 12 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
136 } else if (nWells == "384") { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
137 nRows = 16 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
138 nCols = 24 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
139 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
140 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
141 WELL_ROWS = new PositiveInteger(nRows) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
142 WELL_COLS = new PositiveInteger(nCols) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
143 WELL_ROW = NamingConvention.LETTER |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
144 WELL_COL = NamingConvention.NUMBER |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
145 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
146 /** XML namespace. */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
147 XML_NS = "http://www.openmicroscopy.org/Schemas/OME/2010-06" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
148 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
149 /** XSI namespace. */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
150 XSI_NS = "http://www.w3.org/2001/XMLSchema-instance" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
151 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
152 /** XML schema location. */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
153 SCHEMA_LOCATION = "http://www.openmicroscopy.org/Schemas/OME/2010-06/ome.xsd" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
154 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
155 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
156 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
157 * ***************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
158 * **************************************** Beginning of the script *********************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
159 * **************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
160 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
161 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
162 try { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
163 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
164 println "Beginning of the script" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
165 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
166 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
167 * Prepare list of wells name |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
168 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
169 String[] well = [] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
170 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
171 well = [(0..(nRows - 1)),(0..(nCols - 1))].combinations().collect{ r,c -> LETTERS.substring(r, r + 1) +""+ (c+ 1).toString() } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
172 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
173 IJ.run("Close All", "") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
174 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
175 // loop for all the wells |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
176 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
177 // Store all merged ImagePlus into a HashMap where |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
178 // keys are well name (A1, A10) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
179 // values are a list of ImagePlus corresponding to different field of view |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
180 Map<String, List<ImagePlus>> wellSamplesMap = new HashMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
181 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
182 well.each{ input -> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
183 IJ.run("Close All", "") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
184 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
185 List<ImagePlus> final_imp_list = process_well(base_dir, input, n_images_per_well) //, perform_bc, mediaChangeTime ) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
186 if (!final_imp_list.isEmpty()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
187 wellSamplesMap.put(input, final_imp_list) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
188 for(ImagePlus final_imp : final_imp_list){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
189 final_imp.setTitle(input+"_"+final_imp.getProperty(IMG_POS_IN_WELL)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
190 //final_imp.show() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
191 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
192 def fs = new FileSaver(final_imp) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
193 File output_path = new File (output_dir ,final_imp.getTitle()+"_merge.tif" ) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
194 fs.saveAsTiff(output_path.toString() ) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
195 final_imp.setProperty(FILE_NAME, output_path.getName()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
196 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
197 IJ.run("Close All", "") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
198 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
199 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
200 println "No match for " + input |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
201 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
202 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
203 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
204 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
205 // get folder and xml file path |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
206 output_dir_abs = output_dir.getAbsolutePath() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
207 incucyteXMLFilePath = incucyteXMLFile.getAbsolutePath() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
208 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
209 if (! new File(incucyteXMLFilePath).exists()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
210 println "The incucyte file does not exists" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
211 return |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
212 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
213 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
214 // select the right objective |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
215 switch (objectiveChoice){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
216 case "4x": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
217 objective = 0 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
218 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
219 case "10x": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
220 objective = 1 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
221 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
222 case "20x": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
223 objective = 2 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
224 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
225 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
226 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
227 // get plate scheme as key-values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
228 Map<String, List<MapPair>> keyValuesPerWell = parseIncucyteXML(incucyteXMLFilePath, ignoreConcentration, ignorePassage, ignoreSeeding) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
229 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
230 // get global key-values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
231 List<MapPair> globalKeyValues = getGlobalKeyValues(objective, commonKeyValues) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
232 double pixelSize = pixelSizes[objective] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
233 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
234 // generate OME-XML metadata file |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
235 OME ome = buildXMLFile(wellSamplesMap, keyValuesPerWell, globalKeyValues, pixelSize) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
236 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
237 // create XML document |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
238 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
239 DocumentBuilder parser = factory.newDocumentBuilder() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
240 Document document = parser.newDocument() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
241 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
242 // Produce a valid OME DOM element hierarchy |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
243 Element root = ome.asXMLElement(document) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
244 postProcess(root, document) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
245 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
246 // Produce string XML |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
247 try(OutputStream outputStream = new FileOutputStream(output_dir_abs + File.separator + xmlName + ".companion.ome")){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
248 outputStream.write(asString(document).getBytes()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
249 } catch(Exception e){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
250 e.printStackTrace() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
251 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
252 println "End of the script" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
253 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
254 } catch (Throwable e) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
255 println("Something went wrong: " + e) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
256 e.printStackTrace() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
257 throw e |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
258 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
259 if (GraphicsEnvironment.isHeadless()){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
260 // Force to give exit signal of error |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
261 System.exit(1) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
262 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
263 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
264 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
265 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
266 return |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
267 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
268 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
269 * **************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
270 * ******************************************* End of the script ************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
271 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
272 * **************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
273 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
274 * *********************************** Helpers and processing methods ********************************************* |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
275 * *************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
276 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
277 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
278 def process_well(baseDir, input_wellId, n_image_per_well){ //, perform_bc, mediaChangeTime){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
279 File bf_dir = baseDir.listFiles().find{ it =~ /.*Phase.*/} |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
280 File green_dir = baseDir.listFiles().find{ it =~ /.*Green.*/} |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
281 File red_dir = baseDir.listFiles().find{ it =~ /.*Red.*/} |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
282 //if (verbose) println bf_dir |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
283 //if (verbose) println green_dir |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
284 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
285 // The images are stored in a TreeMap where |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
286 // keys are wellSampleId = field identifier |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
287 // values are a TreeMap that we call channelMap where: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
288 // keys are colors (Green, Grays, Red) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
289 // values are an ImagePlus (T-stack) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
290 Map<Integer, Map<String, ImagePlus>> sampleToChannelMap = new TreeMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
291 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
292 List<File> folder_list = [bf_dir, green_dir, red_dir] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
293 List<String> channels_list = ["Grays", "Green", "Red"] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
294 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
295 // loop over the field and open images |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
296 for(int wellSampleId = 1; wellSampleId <= n_image_per_well; wellSampleId++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
297 // nT is the number of time-points for the well input_wellId |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
298 int nT = 0 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
299 String first_channel = "" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
300 String first_acq_date = "" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
301 String first_acq_time = "" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
302 String rel_acq_hour = "" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
303 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
304 // Initiate a channel map for the wellSampleId |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
305 Map<String, ImagePlus> channelMap = new TreeMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
306 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
307 // Checking if there are images in the corresponding dir |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
308 // which corresponds to the input_wellId |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
309 // and to the wellSampleId |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
310 // The image name should be: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
311 // Prefix + "_" + input_wellId + "_" + wellSampleId + "_" + year (4 digits) + "y" + month (2 digits) + "m" + day + "d_" + hour + "h" + minute + "m.tif" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
312 FileFilter fileFilter = new WildcardFileFilter("*_" + input_wellId + "_" + wellSampleId + "_*") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
313 for(int i = 0; i < folder_list.size(); i++){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
314 if (folder_list.get(i) != null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
315 File[] files_matching = folder_list.get(i).listFiles(fileFilter as FileFilter).sort() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
316 if (files_matching.size() != 0) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
317 // In order to deal with raw images from Incucyte which are |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
318 // Multi series images |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
319 // We open the first image |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
320 ImagePlus first_imp = Opener.openUsingBioFormats(files_matching[0].getAbsolutePath()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
321 // We check if we can read the infos |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
322 first_image_infos = Opener.getTiffFileInfo(files_matching[0].getAbsolutePath()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
323 // We define the imageplus object |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
324 ImagePlus single_channel_imp |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
325 if (first_image_infos == null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
326 // They are raw from incucyte |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
327 // We need to open images one by one and add them to the stack |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
328 ImageStack stack = new ImageStack(first_imp.width, first_imp.height); |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
329 files_matching.each{ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
330 ImagePlus single_imp = (new Opener()).openUsingBioFormats(it.getAbsolutePath()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
331 String new_title = single_imp.getTitle().split(" - ")[0] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
332 stack.addSlice(new_title, single_imp.getProcessor()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
333 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
334 single_channel_imp = new ImagePlus(FilenameUtils.getBaseName(folder_list.get(i).getAbsolutePath()), stack); |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
335 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
336 // They are regular tif file |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
337 // We can use FolderOpener to create the stack at once |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
338 single_channel_imp = FolderOpener.open(folder_list.get(i).getAbsolutePath(), " filter=_"+ input_wellId + "_"+wellSampleId+"_") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
339 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
340 // Phase are 8-bit and need to be changed to 16-bit |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
341 // Other are already 16-bit but it does not hurt |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
342 IJ.run(single_channel_imp, "16-bit", "") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
343 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
344 // check frame size |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
345 if (nT == 0) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
346 // This is the first channel with images |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
347 nT = single_channel_imp.getNSlices() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
348 first_channel = channels_list.get(i) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
349 // Process all dates: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
350 Pattern date_pattern = Pattern.compile(REGEX_FOR_DATE) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
351 ImageStack stack = single_channel_imp.getStack() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
352 // Go to the first time (which is slice) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
353 single_channel_imp.setSlice(1) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
354 int currentSlice = single_channel_imp.getCurrentSlice() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
355 String label = stack.getSliceLabel(currentSlice) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
356 LocalDateTime dateTime_ref = getDate(label, date_pattern) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
357 if (dateTime_ref == null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
358 date_pattern = Pattern.compile(ALTERNATIVE_REGEX_FOR_DATE) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
359 dateTime_ref = getDate(label, date_pattern) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
360 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
361 if (dateTime_ref != null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
362 first_acq_date = dateTime_ref.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
363 first_acq_time = dateTime_ref.format(DateTimeFormatter.ofPattern("HH:mm:ss")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
364 for (int ti = 2; ti<= nT; ti++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
365 // Process each frame starting at 2 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
366 single_channel_imp.setSlice(ti) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
367 int hours = getHoursFromImp(single_channel_imp, stack, dateTime_ref, date_pattern) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
368 if (rel_acq_hour == "") { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
369 rel_acq_hour = "" + hours |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
370 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
371 rel_acq_hour += "," + hours |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
372 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
373 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
374 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
375 first_acq_date = "NA" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
376 first_acq_time = "NA" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
377 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
378 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
379 assert single_channel_imp.getNSlices() == nT : "The number of "+channels_list.get(i)+" images for well "+input_wellId+" and field " + wellSampleId + " does not match the number of images in " + first_channel + "." |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
380 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
381 // Set acquisition properties |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
382 single_channel_imp.setProperty(FIRST_ACQUISITION_DATE, first_acq_date) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
383 single_channel_imp.setProperty(FIRST_ACQUISITION_TIME, first_acq_time) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
384 single_channel_imp.setProperty(RELATIVE_ACQUISITION_HOUR, rel_acq_hour) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
385 println single_channel_imp.getProperty(FIRST_ACQUISITION_DATE) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
386 println single_channel_imp.getProperty(FIRST_ACQUISITION_TIME) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
387 // add the image stack to the channel map for the corresponding color |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
388 channelMap.put(channels_list.get(i), single_channel_imp) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
389 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
390 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
391 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
392 if (nT != 0) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
393 // add the channelmap to the sampleToChannelMap using the wellSampleId as key |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
394 sampleToChannelMap.put(wellSampleId, channelMap) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
395 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
396 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
397 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
398 ArrayList<ImagePlus> final_imp_list = [] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
399 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
400 // Now loop over the wellSampleId which have images |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
401 for(Integer wellSampleId : sampleToChannelMap.keySet()){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
402 // get the channel map |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
403 Map<String, ImagePlus> channelsMap = sampleToChannelMap.get(wellSampleId) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
404 ArrayList<String> channels = [] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
405 ArrayList<ImagePlus> current_images = [] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
406 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
407 for(String channel : channelsMap.keySet()){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
408 channels.add(channel) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
409 current_images.add(channelsMap.get(channel)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
410 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
411 // Get number of time: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
412 int nT = current_images[0].nSlices |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
413 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
414 // Merge all |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
415 ImagePlus merged_imps = Concatenator.run(current_images as ImagePlus[]) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
416 // Re-order to make a multi-channel, time-lapse image |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
417 ImagePlus final_imp |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
418 if (channels.size() == 1 && nT == 1) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
419 final_imp = merged_imps |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
420 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
421 final_imp = HyperStackConverter.toHyperStack(merged_imps, channels.size() , 1, nT, "xytcz", "Color") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
422 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
423 // add properties to the image |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
424 final_imp.setProperty(DIMENSION_ORDER, DimensionOrder.XYCZT) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
425 final_imp.setProperty(IMG_POS_IN_WELL, wellSampleId) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
426 final_imp.setProperty(FIRST_ACQUISITION_DATE, current_images[0].getProperty(FIRST_ACQUISITION_DATE)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
427 final_imp.setProperty(FIRST_ACQUISITION_TIME, current_images[0].getProperty(FIRST_ACQUISITION_TIME)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
428 final_imp.setProperty(RELATIVE_ACQUISITION_HOUR, current_images[0].getProperty(RELATIVE_ACQUISITION_HOUR)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
429 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
430 // set LUTs |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
431 (0..channels.size()-1).each{ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
432 final_imp.setC(it + 1) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
433 IJ.run(final_imp, channels[it], "") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
434 final_imp.resetDisplayRange() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
435 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
436 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
437 final_imp_list.add(final_imp) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
438 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
439 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
440 return final_imp_list |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
441 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
442 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
443 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
444 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
445 * create the full XML metadata (plate, images, channels, annotations....) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
446 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
447 * @param imagesName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
448 * @param keyValuesPerWell |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
449 * @param globalKeyValues |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
450 * @param pixelSize |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
451 * @return OME-XML metadata instance |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
452 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
453 def buildXMLFile(Map<String,List<ImagePlus>> wellToImagesMap, Map<String, List<MapPair>> keyValuesPerWell, List<MapPair> globalKeyValues, double pixelSize) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
454 // create a new OME-XML metadata instance |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
455 OME ome = new OME() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
456 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
457 Map<String, Integer> imgInWellPosToListMap = new HashMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
458 int imgCmp = 0 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
459 for (String wellId: wellToImagesMap.keySet()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
460 // get well position from image name |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
461 List<ImagePlus> imagesWithinWell = wellToImagesMap.get(wellId) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
462 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
463 for (ImagePlus image : imagesWithinWell) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
464 // get KVP corresponding to the current well |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
465 // Initiate a list of keyValues for the wellId |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
466 // (or use the existing one) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
467 List<MapPair> keyValues = [] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
468 if(keyValuesPerWell.containsKey(wellId)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
469 keyValues = keyValuesPerWell.get(wellId) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
470 keyValues.addAll(globalKeyValues) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
471 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
472 // create an Image node in the ome-xml |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
473 imgInWellPosToListMap.put(wellId+ "_" +image.getProperty(IMG_POS_IN_WELL),imgCmp) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
474 ome.addImage(makeImage(imgCmp++, image, keyValues, pixelSize)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
475 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
476 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
477 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
478 // create Plate node |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
479 ome.addPlate(makePlate(wellToImagesMap, imgInWellPosToListMap, pixelSize, ome)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
480 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
481 // add annotation nodes |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
482 ome.setStructuredAnnotations(annotations) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
483 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
484 return ome |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
485 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
486 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
487 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
488 * create an image xml-element, populated with annotations, channel, pixels and path elements |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
489 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
490 * @param index image ID |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
491 * @param imageName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
492 * @param keyValues |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
493 * @param pixelSize |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
494 * @return an image xml-element |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
495 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
496 def makeImage(int index, ImagePlus imagePlus, List<MapPair> keyValues, double pixelSize) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
497 // Create <Image/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
498 Image image = new Image() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
499 image.setID("Image:" + index) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
500 // The image name is the name of the file without extension |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
501 image.setName(((String)imagePlus.getProperty(FILE_NAME)).split("\\.")[0]) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
502 // Set the acquisitionDate: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
503 if (imagePlus.getProperty(FIRST_ACQUISITION_DATE) != "NA") { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
504 image.setAcquisitionDate(new Timestamp(imagePlus.getProperty(FIRST_ACQUISITION_DATE) + "T" + imagePlus.getProperty(FIRST_ACQUISITION_TIME))) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
505 // Also add it to the key values: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
506 keyValues.add(new MapPair("acquisition.day", (String)imagePlus.getProperty(FIRST_ACQUISITION_DATE))) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
507 keyValues.add(new MapPair("acquisition.time", (String)imagePlus.getProperty(FIRST_ACQUISITION_TIME))) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
508 keyValues.add(new MapPair("relative.acquisition.hours", (String)imagePlus.getProperty(RELATIVE_ACQUISITION_HOUR))) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
509 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
510 // Create <MapAnnotations/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
511 MapAnnotation mapAnnotation = new MapAnnotation() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
512 mapAnnotation.setID("ImageKeyValueAnnotation:" + index) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
513 mapAnnotation.setNamespace(GENERAL_ANNOTATION_NAMESPACE) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
514 mapAnnotation.setValue(keyValues) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
515 annotations.addMapAnnotation(mapAnnotation); // add the KeyValues to the general structured annotation element |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
516 image.linkAnnotation(mapAnnotation) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
517 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
518 // Create <Pixels/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
519 Pixels pixels = new Pixels() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
520 pixels.setID("Pixels:" + index) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
521 pixels.setSizeX(new PositiveInteger(imagePlus.getWidth())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
522 pixels.setSizeY(new PositiveInteger(imagePlus.getHeight())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
523 pixels.setSizeZ(new PositiveInteger(imagePlus.getNSlices())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
524 pixels.setSizeC(new PositiveInteger(imagePlus.getNChannels())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
525 pixels.setSizeT(new PositiveInteger(imagePlus.getNFrames())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
526 pixels.setDimensionOrder((DimensionOrder) imagePlus.getProperty(DIMENSION_ORDER)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
527 pixels.setType(getPixelType(imagePlus)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
528 pixels.setPhysicalSizeX(new Length(pixelSize, UNITS.MICROMETER)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
529 pixels.setPhysicalSizeY(new Length(pixelSize, UNITS.MICROMETER)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
530 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
531 // Create <TiffData/> under <Pixels/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
532 TiffData tiffData = new TiffData() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
533 tiffData.setFirstC(new NonNegativeInteger(0)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
534 tiffData.setFirstT(new NonNegativeInteger(0)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
535 tiffData.setFirstZ(new NonNegativeInteger(0)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
536 tiffData.setPlaneCount(new NonNegativeInteger(imagePlus.getNSlices()*imagePlus.getNChannels()*imagePlus.getNFrames())) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
537 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
538 // Create <UUID/> under <TiffData/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
539 UUID uuid = new UUID() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
540 uuid.setFileName((String)imagePlus.getProperty(FILE_NAME)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
541 uuid.setValue(java.util.UUID.randomUUID().toString()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
542 tiffData.setUUID(uuid) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
543 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
544 // Put <TiffData/> under <Pixels/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
545 pixels.addTiffData(tiffData) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
546 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
547 // Create <Channel/> under <Pixels/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
548 LUT[] luts = imagePlus.getLuts() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
549 for (int i = 0; i < luts.length; i++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
550 Channel channel = new Channel() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
551 channel.setID("Channel:" + i) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
552 channel.setColor(new Color(luts[i].getRed(255),luts[i].getGreen(255), luts[i].getBlue(255),255)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
553 pixels.addChannel(channel) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
554 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
555 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
556 // Put <Pixels/> under <Image/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
557 image.setPixels(pixels) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
558 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
559 return image |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
560 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
561 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
562 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
563 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
564 * get pixel type based on the imagePlus type |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
565 * @param imp |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
566 * @return pixel type |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
567 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
568 def getPixelType(ImagePlus imp){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
569 switch (imp.getType()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
570 case ImagePlus.GRAY8: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
571 return PixelType.UINT8 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
572 case ImagePlus.GRAY16: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
573 return PixelType.UINT16 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
574 case ImagePlus.GRAY32: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
575 return PixelType.FLOAT |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
576 default: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
577 return PixelType.FLOAT |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
578 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
579 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
580 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
581 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
582 * create a Plate xml-element, populated with wells and their attributes |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
583 * @param imagesName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
584 * @return Plate xml-element |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
585 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
586 def makePlate(Map<String, List<ImagePlus>> wellToImagesMap, Map<String, Integer> imgPosInListMap, double pixelSize, OME ome) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
587 // Create <Plate/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
588 Plate plate = new Plate() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
589 plate.setName(PLATE_NAME) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
590 plate.setID(PLATE_ID) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
591 plate.setRows(WELL_ROWS) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
592 plate.setColumns(WELL_COLS) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
593 plate.setRowNamingConvention(WELL_ROW) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
594 plate.setColumnNamingConvention(WELL_COL) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
595 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
596 // for each image (one image per well) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
597 for (String wellId: wellToImagesMap.keySet()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
598 // get well position from image name |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
599 List<ImagePlus> imagesWithinWell = wellToImagesMap.get(wellId) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
600 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
601 // get well position from image name |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
602 int row = convertLetterToNumber(wellId.substring(0, 1)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
603 int col = Integer.parseInt(wellId.substring(1)) - 1 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
604 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
605 // row and col should correspond to a real well |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
606 if(row >= 0 && col >= 0 && col < 12) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
607 // Create <Well/> under <Plate/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
608 Well well = new Well() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
609 well.setID(String.format("Well:%d_%d", row, col)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
610 well.setRow(new NonNegativeInteger(row)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
611 well.setColumn(new NonNegativeInteger(col)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
612 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
613 for (ImagePlus imagePlus : imagesWithinWell) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
614 int wellSampleIndex = imgPosInListMap.get(wellId + "_" + imagePlus.getProperty(IMG_POS_IN_WELL)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
615 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
616 // Create <WellSample/> under <Well/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
617 WellSample sample = new WellSample() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
618 sample.setID(String.format("WellSample:%d", wellSampleIndex)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
619 sample.setIndex(new NonNegativeInteger(wellSampleIndex)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
620 if (imagePlus.getCalibration() != null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
621 sample.setPositionX(new Length(imagePlus.getCalibration().xOrigin * pixelSize, UNITS.MICROMETER)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
622 sample.setPositionY(new Length(imagePlus.getCalibration().yOrigin * pixelSize, UNITS.MICROMETER)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
623 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
624 sample.linkImage(ome.getImage(wellSampleIndex)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
625 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
626 // Put <WellSample/> under <Well/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
627 well.addWellSample(sample) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
628 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
629 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
630 // Put <Well/> under <Plate/> |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
631 plate.addWell(well) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
632 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
633 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
634 return plate |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
635 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
636 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
637 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
638 * convert the XML metadata document into string |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
639 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
640 * @param document |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
641 * @return |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
642 * @throws TransformerException |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
643 * @throws UnsupportedEncodingException |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
644 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
645 def asString(Document document) throws TransformerException, UnsupportedEncodingException { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
646 TransformerFactory transformerFactory = TransformerFactory.newInstance() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
647 Transformer transformer = transformerFactory.newTransformer() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
648 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
649 //Setup indenting to "pretty print" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
650 transformer.setOutputProperty(OutputKeys.INDENT, "yes") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
651 transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
652 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
653 Source source = new DOMSource(document) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
654 ByteArrayOutputStream os = new ByteArrayOutputStream() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
655 Result result = new StreamResult(new OutputStreamWriter(os, "utf-8")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
656 transformer.transform(source, result) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
657 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
658 return os.toString() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
659 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
660 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
661 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
662 * add document header |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
663 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
664 * @param root |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
665 * @param document |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
666 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
667 def postProcess(Element root, Document document) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
668 root.setAttribute("xmlns", XML_NS) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
669 root.setAttribute("xmlns:xsi", XSI_NS) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
670 root.setAttribute("xsi:schemaLocation", XML_NS + " " + SCHEMA_LOCATION) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
671 root.setAttribute("UUID", java.util.UUID.randomUUID().toString()) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
672 document.appendChild(root) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
673 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
674 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
675 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
676 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
677 * read Incucyte plate-scheme XML file, extract attributes per well and convert attributes to OMERO-compatible |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
678 * keys-value pairs XML elements. |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
679 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
680 * @param path Incucyte plate-scheme XML file path |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
681 * @return Map of OME-XML compatible key-values per well |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
682 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
683 def parseIncucyteXML(String path, Boolean ignoreConcentration, Boolean ignorePassage, Boolean ignoreSeeding) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
684 Map<String, List<MapPair>> keyValuesPerWell = new HashMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
685 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
686 final String rowAttribute = "row" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
687 final String columnAttribute = "col" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
688 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
689 final String wellNode = "well" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
690 final String itemsNode = "items" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
691 final String wellItemNode = "wellItem" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
692 final String referenceItemNode = "referenceItem" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
693 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
694 // There are 3 types of referenceItem: Compound, CellType, GrowthCondition |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
695 // |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
696 // For the Compound, each well can have a concentration and a concentrationUnits |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
697 // the referenceItem has a displayName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
698 // The key should be: displayName (concentrationUnits) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
699 // The value should be: concentration |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
700 // However, if ignoreConcentration is set to true: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
701 // The key should be: displayName (NA) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
702 // The value should be: 1 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
703 // |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
704 // For the CellType, each well can have a passage, a seedingDensity and a seedingDensityUnits |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
705 // the referenceItem has a displayName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
706 // The passage key should be: displayName_passage |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
707 // The value should be: passage |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
708 // However, if ignorePassage is set to true no key value should be stored for this |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
709 // Then: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
710 // The seeding key should be: displayName_seedingDensity (seedingDensityUnits) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
711 // The value should be: seedingDensity |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
712 // However, if ignoreSeeding is set to true: |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
713 // The key should be: displayName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
714 // The value should be: "yes" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
715 // |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
716 // For the GrowthCondition, the referenceItem has a displayName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
717 // The key should be: displayName |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
718 // The value should be: "yes" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
719 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
720 try { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
721 // create an document |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
722 DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
723 DocumentBuilder dBuilder = dbFactory.newDocumentBuilder() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
724 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
725 // read the xml file |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
726 Document doc = dBuilder.parse(new File(path)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
727 doc.getDocumentElement().normalize() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
728 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
729 // get all "well" nodes |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
730 NodeList wellList = doc.getElementsByTagName(wellNode) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
731 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
732 for(int i = 0; i < wellList.getLength(); i++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
733 Node well = wellList.item(i) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
734 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
735 // extract well attributes |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
736 String row = well.getAttributes().getNamedItem(rowAttribute).getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
737 int r = row as int |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
738 String col = well.getAttributes().getNamedItem(columnAttribute).getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
739 String wellNumber = LETTERS.substring(r, r + 1) + (Integer.parseInt(col)+ 1) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
740 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
741 // extract items node, under well node |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
742 Node items = ((Element)well).getElementsByTagName(itemsNode).item(0) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
743 if (items != null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
744 // get all "wellItem" nodes, under items node |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
745 NodeList wellItemList = ((Element)items).getElementsByTagName(wellItemNode) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
746 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
747 // read referenceItem node's attributes and convert them into key-values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
748 List<MapPair> keyValues = new ArrayList<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
749 for (int j = 0; j < wellItemList.getLength(); j++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
750 Node wellItem = wellItemList.item(j) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
751 // extract referenceItem node, under wellItem node |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
752 Node referenceItem = ((Element)wellItem).getElementsByTagName(referenceItemNode).item(0) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
753 String wellType = wellItem.getAttributes().getNamedItem("type").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
754 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
755 // select the right key-values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
756 switch (wellType){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
757 case "Compound": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
758 String compound_name = referenceItem.getAttributes().getNamedItem("displayName").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
759 if (ignoreConcentration) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
760 keyValues.add(new MapPair(compound_name + " (NA)", "1")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
761 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
762 String unit = wellItem.getAttributes().getNamedItem("concentrationUnits").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
763 unit = unit.replace("\u00B5", "u") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
764 String value = wellItem.getAttributes().getNamedItem("concentration").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
765 keyValues.add(new MapPair(compound_name + " (" + unit + ")", value)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
766 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
767 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
768 case "CellType": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
769 String cell_name = referenceItem.getAttributes().getNamedItem("displayName").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
770 if (!ignorePassage) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
771 String passage = wellItem.getAttributes().getNamedItem("passage").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
772 keyValues.add(new MapPair(cell_name + "_passage", passage)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
773 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
774 if (ignoreSeeding) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
775 keyValues.add(new MapPair(cell_name, "yes")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
776 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
777 String unit = wellItem.getAttributes().getNamedItem("seedingDensityUnits").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
778 unit = unit.replace("\u00B5", "u") |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
779 String value = wellItem.getAttributes().getNamedItem("seedingDensity").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
780 keyValues.add(new MapPair(cell_name + "_seedingDensity (" + unit + ")", value)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
781 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
782 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
783 case "GrowthCondition": |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
784 String growth_condition = referenceItem.getAttributes().getNamedItem("displayName").getTextContent() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
785 keyValues.add(new MapPair(growth_condition, "yes")) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
786 break |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
787 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
788 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
789 keyValuesPerWell.put(wellNumber,keyValues) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
790 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
791 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
792 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
793 return keyValuesPerWell |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
794 } catch (Exception e) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
795 println "XML platemap could not be parsed" |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
796 e.printStackTrace() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
797 return new HashMap<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
798 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
799 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
800 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
801 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
802 * make a list of all key-values that are common to all images |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
803 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
804 * @param objective |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
805 * @param commonKeyValues (a String with the following format: key1=value1;key2=value2) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
806 * @return a list of OME-XML key-values |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
807 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
808 def getGlobalKeyValues(int objective, String commonKeyValues){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
809 List<MapPair> keyValues = new ArrayList<>() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
810 keyValues.add(new MapPair("groovy_version", VERSION)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
811 keyValues.add(new MapPair("objective", objectives[objective])) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
812 if (commonKeyValues != "") { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
813 String[] keyValList = commonKeyValues.split(';') |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
814 for (int i = 0; i < keyValList.size(); i ++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
815 String keyval = keyValList[i] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
816 String[] keyvalsplit = keyval.split('=') |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
817 int nPieces = keyvalsplit.size() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
818 String value = keyvalsplit[nPieces - 1] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
819 String key = keyvalsplit[0] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
820 // In case there are '=' in key |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
821 for (int j = 1; j < nPieces - 1; j++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
822 key += '=' + keyvalsplit[j] |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
823 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
824 keyValues.add(new MapPair(key, value)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
825 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
826 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
827 return keyValues |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
828 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
829 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
830 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
831 * convert alphanumeric well position to numeric position |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
832 * |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
833 * @param letter |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
834 * @return |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
835 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
836 def convertLetterToNumber(String letter){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
837 for (int i = 0; i < LETTERS.size(); i++) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
838 if (LETTERS.substring(i, i + 1) == letter) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
839 return i |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
840 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
841 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
842 return -1 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
843 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
844 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
845 // Returns a date from a label and a date_pattern |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
846 def getDate(String label, Pattern date_pattern){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
847 // println "Trying to get date from " + label |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
848 Matcher date_m = date_pattern.matcher(label) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
849 LocalDateTime dateTime |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
850 if (date_m.matches()) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
851 if (date_m.groupCount() == 5) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
852 dateTime = LocalDateTime.parse(date_m.group(1) + "-" + date_m.group(2) + "-" + date_m.group(3) + "T" + date_m.group(4) + ":" + date_m.group(5)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
853 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
854 dateTime = LocalDateTime.parse("1970-01-" + 1 + (date_m.group(1) as int) + "T" + date_m.group(2) + ":" + date_m.group(3)) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
855 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
856 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
857 // println "Found " + dateTime |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
858 return dateTime |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
859 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
860 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
861 // Returns the number of hours |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
862 def getHoursFromImp(ImagePlus imp, ImageStack stack, LocalDateTime dateTime_ref, Pattern date_pattern){ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
863 int currentSlice = imp.getCurrentSlice() |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
864 String label = stack.getSliceLabel(currentSlice) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
865 LocalDateTime dateTime = getDate(label, date_pattern) |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
866 if (dateTime != null) { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
867 return ChronoUnit.HOURS.between(dateTime_ref, dateTime) as int |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
868 } else { |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
869 return -1 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
870 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
871 } |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
872 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
873 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
874 /** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
875 * ***************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
876 * ************************************************* Imports **************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
877 * **************************************************************************************************************** |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
878 */ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
879 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
880 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
881 import ij.IJ |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
882 import ij.ImagePlus |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
883 import ij.ImageStack |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
884 import ij.io.FileSaver |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
885 import ij.io.Opener |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
886 import ij.plugin.Concatenator |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
887 import ij.plugin.FolderOpener |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
888 import ij.plugin.HyperStackConverter |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
889 import ij.process.LUT |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
890 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
891 import java.awt.GraphicsEnvironment |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
892 import java.io.File |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
893 import java.time.format.DateTimeFormatter |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
894 import java.time.LocalDateTime |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
895 import java.time.temporal.ChronoUnit |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
896 import java.util.stream.Collectors |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
897 import java.util.stream.IntStream |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
898 import java.util.regex.* |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
899 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
900 import javax.xml.parsers.DocumentBuilder |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
901 import javax.xml.parsers.DocumentBuilderFactory |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
902 import javax.xml.transform.OutputKeys |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
903 import javax.xml.transform.Result |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
904 import javax.xml.transform.Source |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
905 import javax.xml.transform.Transformer |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
906 import javax.xml.transform.TransformerException |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
907 import javax.xml.transform.TransformerFactory |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
908 import javax.xml.transform.dom.DOMSource |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
909 import javax.xml.transform.stream.StreamResult |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
910 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
911 import ome.units.UNITS |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
912 import ome.units.quantity.Length |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
913 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
914 import ome.xml.model.Channel |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
915 import ome.xml.model.Image |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
916 import ome.xml.model.MapAnnotation |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
917 import ome.xml.model.MapPair |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
918 import ome.xml.model.OME |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
919 import ome.xml.model.Pixels |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
920 import ome.xml.model.Plate |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
921 import ome.xml.model.StructuredAnnotations |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
922 import ome.xml.model.TiffData |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
923 import ome.xml.model.UUID |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
924 import ome.xml.model.Well |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
925 import ome.xml.model.WellSample |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
926 import ome.xml.model.enums.DimensionOrder |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
927 import ome.xml.model.enums.NamingConvention |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
928 import ome.xml.model.enums.PixelType |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
929 import ome.xml.model.primitives.Color |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
930 import ome.xml.model.primitives.NonNegativeInteger |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
931 import ome.xml.model.primitives.PositiveInteger |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
932 import ome.xml.model.primitives.Timestamp |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
933 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
934 import org.apache.commons.io.filefilter.WildcardFileFilter |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
935 import org.apache.commons.io.FilenameUtils |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
936 |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
937 import org.w3c.dom.Document |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
938 import org.w3c.dom.Element |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
939 import org.w3c.dom.Node |
a599551e800d
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364-dirty
mvdbeek
parents:
diff
changeset
|
940 import org.w3c.dom.NodeList |