beniroquai / Opentrons-Microscope-Platereader

Other
18 stars 0 forks source link

Software-based Autofocus from openflexure works very well... #13

Open beniroquai opened 3 years ago

beniroquai commented 3 years ago

This is a scan of some HeLa cells in a plastic 12-well plate:

SCAN_2021-01-20_09-32-06 kept stack

It took around <1min to capture it. The online focus sensor does not really work with the non-flat surfaces of these plates. Very unfortunate ;-)

beniroquai commented 3 years ago

Reconstructing them with Fiji

Use the Stitching Plugin by Saalfeld, Preibisch:

image

Set the parameters as follows:

image

In the openflexure GUI image

Then the result could look like that: image

Hmm.. something went wrong ;-)

But: For the first start it works.

Console output:

Stitching internal version: 1.2
Loading (0, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_07.tif ... 
832x624px, channels=1, timepoints=1 (612 ms)
Loading (1, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_06.tif ... 
832x624px, channels=1, timepoints=1 (289 ms)
Loading (2, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_01.tif ... 
832x624px, channels=1, timepoints=1 (233 ms)
Loading (0, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_08.tif ... 
832x624px, channels=1, timepoints=1 (246 ms)
Loading (1, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_05.tif ... 
832x624px, channels=1, timepoints=1 (243 ms)
Loading (2, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_02.tif ... 
832x624px, channels=1, timepoints=1 (227 ms)
Loading (0, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_09.tif ... 
ERROR: Cannot find file: 'C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_09.tif' - abort stitching.
ERROR: Error during tile discovery, or invalid grid type. Aborting.
Stitching internal version: 1.2
Stitching internal version: 1.2
Loading (0, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_06.tif ... 
832x624px, channels=1, timepoints=1 (294 ms)
Loading (1, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_05.tif ... 
832x624px, channels=1, timepoints=1 (261 ms)
Loading (2, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_00.tif ... 
832x624px, channels=1, timepoints=1 (244 ms)
Loading (0, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_07.tif ... 
832x624px, channels=1, timepoints=1 (253 ms)
Loading (1, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_04.tif ... 
832x624px, channels=1, timepoints=1 (231 ms)
Loading (2, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_01.tif ... 
832x624px, channels=1, timepoints=1 (219 ms)
Loading (0, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_08.tif ... 
832x624px, channels=1, timepoints=1 (226 ms)
Loading (1, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_03.tif ... 
832x624px, channels=1, timepoints=1 (216 ms)
Loading (2, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\tile_02.tif ... 
832x624px, channels=1, timepoints=1 (234 ms)
tile_06.tif[1] <- tile_05.tif[1]: (676.0, -326.0) correlation (R)=0.17473161 (526 ms)
tile_06.tif[1] <- tile_07.tif[1]: (-1005.0, 355.0) correlation (R)=0.0 (172 ms)
tile_06.tif[1] <- tile_04.tif[1]: (503.0, 465.0) correlation (R)=0.16684042 (39 ms)
tile_05.tif[1] <- tile_00.tif[1]: (663.0, 4.0) correlation (R)=0.21216333 (108 ms)
tile_05.tif[1] <- tile_07.tif[1]: (-654.0, 499.0) correlation (R)=0.089741245 (30 ms)
tile_05.tif[1] <- tile_04.tif[1]: (-687.0, 508.0) correlation (R)=0.04840245 (79 ms)
tile_05.tif[1] <- tile_01.tif[1]: (455.0, 355.0) correlation (R)=0.0 (20 ms)
tile_00.tif[1] <- tile_04.tif[1]: (-675.0, 499.0) correlation (R)=0.009700759 (23 ms)
tile_00.tif[1] <- tile_01.tif[1]: (122.0, 508.0) correlation (R)=0.083272025 (70 ms)
tile_07.tif[1] <- tile_04.tif[1]: (665.0, 18.0) correlation (R)=0.20778073 (56 ms)
tile_07.tif[1] <- tile_08.tif[1]: (1005.0, 355.0) correlation (R)=0.0 (54 ms)
tile_07.tif[1] <- tile_03.tif[1]: (455.0, 355.0) correlation (R)=0.0 (14 ms)
tile_04.tif[1] <- tile_01.tif[1]: (665.0, 0.0) correlation (R)=0.11910404 (54 ms)
tile_04.tif[1] <- tile_08.tif[1]: (-667.0, 499.0) correlation (R)=0.11522294 (20 ms)
tile_04.tif[1] <- tile_03.tif[1]: (-985.0, 355.0) correlation (R)=0.0 (55 ms)
tile_04.tif[1] <- tile_02.tif[1]: (871.0, 355.0) correlation (R)=0.0 (23 ms)
tile_01.tif[1] <- tile_03.tif[1]: (-671.0, 499.0) correlation (R)=0.016024157 (14 ms)
tile_01.tif[1] <- tile_02.tif[1]: (999.0, 355.0) correlation (R)=0.0 (46 ms)
tile_08.tif[1] <- tile_03.tif[1]: (504.0, -573.0) correlation (R)=0.19145074 (50 ms)
tile_03.tif[1] <- tile_02.tif[1]: (665.0, 7.0) correlation (R)=0.039723076 (50 ms)
ERROR: Error: No correlated tiles found, setting the first tile to (0, 0).
 number of tiles = 1
Finished registration process (1521 ms).
tile_06.tif: [3,3](AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) 1.7976931348623157E308
Writing registered TileConfiguration: C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\_22021_01_20_platereaderresult\SCAN_2021-01-20_09-32-06\TileConfiguration.registered.txt
Fuse & Display ...
Finished fusion (106 ms)
Finished ... (3858 ms)
Initializing Bio-Formats reader...
Adding ROIs...
ROIs generated.
Stitching internal version: 1.2
Stitching internal version: 1.2
Loading (0, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_08.jpeg ... 
832x624px, channels=3, timepoints=1 (271 ms)
Loading (1, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_03.jpeg ... 
832x624px, channels=3, timepoints=1 (163 ms)
Loading (2, 0): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_02.jpeg ... 
832x624px, channels=3, timepoints=1 (164 ms)
Loading (0, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_07.jpeg ... 
832x624px, channels=3, timepoints=1 (205 ms)
Loading (1, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_04.jpeg ... 
832x624px, channels=3, timepoints=1 (156 ms)
Loading (2, 1): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_01.jpeg ... 
832x624px, channels=3, timepoints=1 (182 ms)
Loading (0, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_06.jpeg ... 
832x624px, channels=3, timepoints=1 (171 ms)
Loading (1, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_05.jpeg ... 
832x624px, channels=3, timepoints=1 (149 ms)
Loading (2, 2): C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\2021-01-20_09-56-38_00.jpeg ... 
832x624px, channels=3, timepoints=1 (167 ms)
2021-01-20_09-56-38_03.jpeg[1] <- 2021-01-20_09-56-38_01.jpeg[1]: (455.0, 355.0) correlation (R)=0.0 (100 ms)
2021-01-20_09-56-38_03.jpeg[1] <- 2021-01-20_09-56-38_07.jpeg[1]: (-665.0, 499.0) correlation (R)=0.15126084 (110 ms)
2021-01-20_09-56-38_08.jpeg[1] <- 2021-01-20_09-56-38_04.jpeg[1]: (455.0, 355.0) correlation (R)=0.0 (117 ms)
2021-01-20_09-56-38_02.jpeg[1] <- 2021-01-20_09-56-38_04.jpeg[1]: (-685.0, 561.0) correlation (R)=0.11273253 (122 ms)
2021-01-20_09-56-38_03.jpeg[1] <- 2021-01-20_09-56-38_04.jpeg[1]: (100.0, 495.0) correlation (R)=0.10378756 (154 ms)
2021-01-20_09-56-38_08.jpeg[1] <- 2021-01-20_09-56-38_03.jpeg[1]: (665.0, -9.0) correlation (R)=0.11802149 (171 ms)
2021-01-20_09-56-38_03.jpeg[1] <- 2021-01-20_09-56-38_02.jpeg[1]: (665.0, 9.0) correlation (R)=0.049477197 (184 ms)
2021-01-20_09-56-38_08.jpeg[1] <- 2021-01-20_09-56-38_07.jpeg[1]: (983.0, 355.0) correlation (R)=0.0 (184 ms)
2021-01-20_09-56-38_04.jpeg[1] <- 2021-01-20_09-56-38_00.jpeg[1]: (653.0, 499.0) correlation (R)=0.03071598 (124 ms)
2021-01-20_09-56-38_04.jpeg[1] <- 2021-01-20_09-56-38_01.jpeg[1]: (514.0, -583.0) correlation (R)=0.2287869 (159 ms)
2021-01-20_09-56-38_07.jpeg[1] <- 2021-01-20_09-56-38_06.jpeg[1]: (-154.0, 504.0) correlation (R)=0.07263565 (154 ms)
2021-01-20_09-56-38_07.jpeg[1] <- 2021-01-20_09-56-38_05.jpeg[1]: (868.0, 355.0) correlation (R)=0.0 (99 ms)
2021-01-20_09-56-38_04.jpeg[1] <- 2021-01-20_09-56-38_05.jpeg[1]: (188.0, 442.0) correlation (R)=0.4166481 (192 ms)
2021-01-20_09-56-38_04.jpeg[1] <- 2021-01-20_09-56-38_06.jpeg[1]: (-715.0, 431.0) correlation (R)=0.4864281 (140 ms)
2021-01-20_09-56-38_07.jpeg[1] <- 2021-01-20_09-56-38_04.jpeg[1]: (665.0, 7.0) correlation (R)=0.12585872 (152 ms)
2021-01-20_09-56-38_02.jpeg[1] <- 2021-01-20_09-56-38_01.jpeg[1]: (2.0, 507.0) correlation (R)=0.18355626 (171 ms)
2021-01-20_09-56-38_06.jpeg[1] <- 2021-01-20_09-56-38_05.jpeg[1]: (542.0, -523.0) correlation (R)=0.2411444 (110 ms)
2021-01-20_09-56-38_05.jpeg[1] <- 2021-01-20_09-56-38_00.jpeg[1]: (699.0, -520.0) correlation (R)=0.20606624 (118 ms)
2021-01-20_09-56-38_01.jpeg[1] <- 2021-01-20_09-56-38_05.jpeg[1]: (-665.0, 507.0) correlation (R)=0.19240855 (60 ms)
2021-01-20_09-56-38_01.jpeg[1] <- 2021-01-20_09-56-38_00.jpeg[1]: (-3.0, 439.0) correlation (R)=0.32032526 (100 ms)
0: 0.0 0.0
1: 0.0 0.0
2: 0.0 0.0
3: 0.0 0.0
4: 0.0 0.0
5: 0.0 0.0
6: 0.0 0.0
7: 0.0 0.0
8: 0.0 0.0
9: 0.0 0.0
10: 0.0 0.0
11: 0.0 0.0
12: 0.0 0.0
13: 0.0 0.0
14: 0.0 0.0
15: 0.0 0.0
16: 0.0 0.0
17: 0.0 0.0
18: 0.0 0.0
19: 0.0 0.0
20: 0.0 0.0
21: 0.0 0.0
22: 0.0 0.0
23: 0.0 0.0
24: 0.0 0.0
25: 0.0 0.0
26: 0.0 0.0
27: 0.0 0.0
28: 0.0 0.0
29: 0.0 0.0
30: 0.0 0.0
31: 0.0 0.0
32: 0.0 0.0
33: 0.0 0.0
34: 0.0 0.0
35: 0.0 0.0
36: 0.0 0.0
37: 0.0 0.0
38: 0.0 0.0
39: 0.0 0.0
40: 0.0 0.0
41: 0.0 0.0
42: 0.0 0.0
43: 0.0 0.0
44: 0.0 0.0
45: 0.0 0.0
46: 0.0 0.0
47: 0.0 0.0
48: 0.0 0.0
49: 0.0 0.0
50: 0.0 0.0
51: 0.0 0.0
52: 0.0 0.0
53: 0.0 0.0
54: 0.0 0.0
55: 0.0 0.0
56: 0.0 0.0
57: 0.0 0.0
58: 0.0 0.0
59: 0.0 0.0
60: 0.0 0.0
61: 0.0 0.0
62: 0.0 0.0
63: 0.0 0.0
64: 0.0 0.0
65: 0.0 0.0
66: 0.0 0.0
67: 0.0 0.0
68: 0.0 0.0
69: 0.0 0.0
70: 0.0 0.0
71: 0.0 0.0
72: 0.0 0.0
73: 0.0 0.0
74: 0.0 0.0
75: 0.0 0.0
76: 0.0 0.0
77: 0.0 0.0
78: 0.0 0.0
79: 0.0 0.0
80: 0.0 0.0
81: 0.0 0.0
82: 0.0 0.0
83: 0.0 0.0
84: 0.0 0.0
85: 0.0 0.0
86: 0.0 0.0
87: 0.0 0.0
88: 0.0 0.0
89: 0.0 0.0
90: 0.0 0.0
91: 0.0 0.0
92: 0.0 0.0
93: 0.0 0.0
94: 0.0 0.0
95: 0.0 0.0
96: 0.0 0.0
97: 0.0 0.0
98: 0.0 0.0
99: 0.0 0.0
100: 0.0 0.0
101: 0.0 0.0
102: 0.0 0.0
103: 0.0 0.0
104: 0.0 0.0
105: 0.0 0.0
106: 0.0 0.0
107: 0.0 0.0
108: 0.0 0.0
109: 0.0 0.0
110: 0.0 0.0
111: 0.0 0.0
112: 0.0 0.0
113: 0.0 0.0
114: 0.0 0.0
115: 0.0 0.0
116: 0.0 0.0
117: 0.0 0.0
118: 0.0 0.0
119: 0.0 0.0
120: 0.0 0.0
121: 0.0 0.0
122: 0.0 0.0
123: 0.0 0.0
124: 0.0 0.0
125: 0.0 0.0
126: 0.0 0.0
127: 0.0 0.0
128: 0.0 0.0
129: 0.0 0.0
130: 0.0 0.0
131: 0.0 0.0
132: 0.0 0.0
133: 0.0 0.0
134: 0.0 0.0
135: 0.0 0.0
136: 0.0 0.0
137: 0.0 0.0
138: 0.0 0.0
139: 0.0 0.0
140: 0.0 0.0
141: 0.0 0.0
142: 0.0 0.0
143: 0.0 0.0
144: 0.0 0.0
145: 0.0 0.0
146: 0.0 0.0
147: 0.0 0.0
148: 0.0 0.0
149: 0.0 0.0
150: 0.0 0.0
151: 0.0 0.0
152: 0.0 0.0
153: 0.0 0.0
154: 0.0 0.0
155: 0.0 0.0
156: 0.0 0.0
157: 0.0 0.0
158: 0.0 0.0
159: 0.0 0.0
160: 0.0 0.0
161: 0.0 0.0
162: 0.0 0.0
163: 0.0 0.0
164: 0.0 0.0
165: 0.0 0.0
166: 0.0 0.0
167: 0.0 0.0
168: 0.0 0.0
169: 0.0 0.0
170: 0.0 0.0
171: 0.0 0.0
172: 0.0 0.0
173: 0.0 0.0
174: 0.0 0.0
175: 0.0 0.0
176: 0.0 0.0
177: 0.0 0.0
178: 0.0 0.0
179: 0.0 0.0
180: 0.0 0.0
181: 0.0 0.0
182: 0.0 0.0
183: 0.0 0.0
184: 0.0 0.0
185: 0.0 0.0
186: 0.0 0.0
187: 0.0 0.0
188: 0.0 0.0
189: 0.0 0.0
190: 0.0 0.0
191: 0.0 0.0
192: 0.0 0.0
193: 0.0 0.0
194: 0.0 0.0
195: 0.0 0.0
196: 0.0 0.0
197: 0.0 0.0
198: 0.0 0.0
199: 0.0 0.0
200: 0.0 0.0
201: 0.0 0.0
Finished registration process (731 ms).
2021-01-20_09-56-38_00.jpeg: [3,3](AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) 0.0
2021-01-20_09-56-38_01.jpeg: [3,3](AffineTransform[[1.0, 0.0, 3.0], [0.0, 1.0, -439.0]]) 0.0
2021-01-20_09-56-38_04.jpeg: [3,3](AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) 0.0
2021-01-20_09-56-38_05.jpeg: [3,3](AffineTransform[[1.0, 0.0, 188.0], [0.0, 1.0, 442.0]]) 0.0
2021-01-20_09-56-38_06.jpeg: [3,3](AffineTransform[[1.0, 0.0, -715.0], [0.0, 1.0, 431.0]]) 0.0
Writing registered TileConfiguration: C:\Users\diederichbenedict\Dropbox\Dokumente\Promotion\PROJECTS\OPENTRONS\2021_01_20_platereaderresult_3\SCAN_2021-01-20_09-56-38\TileConfiguration.registered.txt
Fuse & Display ...
Finished fusion (402 ms)
Finished ... (2797 ms)
Stitching internal version: 1.2

@oeway perhaps we could use imjoy for the stitching step? :)

beniroquai commented 3 years ago

Ah, my bad.. I had a 5x5 scan instead of a 3x3:

image

The flatfield image is not so good of course ;-)