forked from erickmartins/training
-
Notifications
You must be signed in to change notification settings - Fork 1
/
IntroFiji.html
1093 lines (952 loc) · 56.2 KB
/
IntroFiji.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Introduction to Image Analysis with Fiji</title>
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/cci.css">
<link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="plugin/highlight/vs.css">
</head>
<body>
<div class="reveal">
<!-- Header logo -->
<!--img style="position:fixed;top:1em;right:1em;" src="img/logo_cci.png" width="15%"-->
<!-- Slide Title -->
<header style="position: absolute;top: 1em; left: 1em; z-index:10;"></header>
<!-- ---------------------- START OF SLIDES -------------------------- -->
<div class="slides">
<section data-menu-title="Title">
<h2>Introduction to Image Analysis with Fiji</h2>
<h4>Peter Sobolewski (he/him)<br>Systems Analyst, Imaging Applications - Research IT</h4>
<p class="subtle">Use <i class="fa fa-arrow-right"></i> to advance the slide</p>
</section>
<section data-menu-title="Before anything else..." data-state="intro0a"><style>.intro0a header:after { content: "Before anything else..."; }</style>
<h2>Thanks to:</h2>
<ul>
<li>Erick Ratamero (JAX), who prepared the original of <i>these</i> materials</li>
<li>Dave Mason, (formerly) from the University of Liverpool, who prepared the original materials Erick adapted</li>
<ul>
<li>Unfortunately Dave's original slides are lost to time, but they looked very much like these.</li>
</ul>
</ul>
</section>
<section data-menu-title="Links and Resources" data-state="intro0"><style>.intro0 header:after { content: "Links and Resources"; }</style>
<ul>
<li>These slides: <a target="_blank" href="https://thejacksonlaboratory.github.io/fiji_workshops/IntroFiji.html">https://thejacksonlaboratory.github.io/fiji_workshops/IntroFiji.html</a></li>
<li>The JAX Fiji workshops landing page: <a target="_blank" href="https://thejacksonlaboratory.github.io/fiji_workshops/">https://thejacksonlaboratory.github.io/fiji_workshops/</a></li>
<ul><li>Navigation: arrow keys left and right to navigate</li>
<li>`m` key to get to navigation menu—browser back button won't work between slides</li>
<li>Escape for slide overview</li></ul>
</ul>
</section>
<section data-state="intro0"><style>.intro0 header:after { content: "Links and Resources"; }</style>
<ul>
<li>Fiji & Bioimage analysis resources:</li>
<ul><li><a target="_blank" href="https://fiji.sc">Fiji Website</a></li>
<li><a target="_blank" href="https://bridges.monash.edu/articles/educational_resource/Fiji_Training_Manual_v6_5_/21901989">Fiji Training Notes by Cameron Newell, Monash University</a></li>
<li><a target="_blank" href="https://bioimagebook.github.io">Introduction to Bioimage Analysis</a> online book</li>
</ul>
<li>Where to find help after the workshop:</li>
<ul>
<li><a target="_blank" href="https://forum.image.sc">image.sc Forum</a></li>
<li><a target="_blank" href="https://thejacksonlaboratory.slack.com/archives/CFWUF2MK3"></a>#image-analysis</a> Slack channel</li>
<li><a target="_blank" href="https://jacksonlaboratory.sharepoint.com/sites/MyJax/_layouts/15/Event.aspx?ListGuid=a550d0ea-2ff2-4fdc-acd0-e59e2ad78ceb&ItemId=1116">Imaging Applications Coffee Hour</a></li></ul>
</ul></ul>
</section>
<section data-menu-title="How an image is formed" data-state="intro1z"><style>.intro1z header:after { content: ""; }</style>
<h1>How an Image is formed</h1>
<h4>Understanding digital images</h4>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<div><img class="half" src="img-ia/scopes1.png"/>
<img class="half" src="img-ia/scopes2.png"/></div>
<p>Widefield and Confocal microscopes acquire images in different ways.</p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<p>Widefield and laser-scanning microscopes acquire images in different ways.</p>
<div><img class="half fragment" src="img-ia/acq_widefield.png"/>
<img class="half fragment" src="img-ia/acq_lsm.png"/></div>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="imbox" src="img-ia/detector.png"/>
<p>Detectors collect photons and convert them to a voltage</p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="imbox" src="img-ia/ad_1.png"/>
<p>The A/D converter determines the dynamic range of the data</p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="imbox" src="img-ia/bd1.png"/>
<p></p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="imbox" src="img-ia/bd2.png"/>
<p></p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="imbox" src="img-ia/bd3.png"/>
<p>Unless you have good reason not to, always collect data at the highest possible bit depth</p>
</section>
<section data-state="intro1"><style>.intro1 header:after { content: "How an image is formed"; }</style>
<img class="left half" src="img-ia/bd3.png"/>
<p class="right half fragment">32 bit is a special data type called <a href="https://en.wikipedia.org/wiki/Floating-point_arithmetic#Floating-point_numbers" target="_blank">floating point</a>. <br/><br/><b>TL;DR:</b> pixels can have non-integer values which can be useful in applications like ratiometric imaging.</p>
</section>
<section data-menu-title="Introduction to ImageJ" data-state="fijiz"><style>.fiji1z header:after { content: ""; }</style>
<h1>Introduction to ImageJ & Fiji</h1>
<h4>A cross platform, open source, Java-based image processing program</h4>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<img class="third left" src="img-ia/fiji1.png"/>
<div class="twothirds right">
<p><i>ImageJ</i> is a java program for image processing and analysis.<br><b>Fiji</b> extends this via plugins.</p>
<ul>
<li>Open Source (free to modify)</li>
<li>Extensible (plugins)</li>
<li>Cross-Platform (Java-Based)</li>
<li>Scriptable for Automation</li>
<li>Vast Functionality</li>
<li>Includes the Bioformats Library</li>
</ul>
</div>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<img src="img-ia/bioformats.jpg"/>
<p>Learn more about Bio-Formats <a href="https://www.openmicroscopy.org/bio-formats/" target="_blank">here</a></p>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<img class="imbox" src="img-ia/fiji2.png"/>
<p></p>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<img class="imbox" src="img-ia/fiji3.png"/>
<p></p>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<img class="imbox" src="img-ia/fiji4.png"/>
<p></p>
</section>
<section data-state="fiji1"><style>.fiji2 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<div class="left twothirds">
<h2>A few small productivity tips</h2>
<ul>
<li>Zoom using +/- keys</li>
<li>When zoomed in, pan by holding space and click-dragging with mouse</li>
<li>Hit 'Enter' to bring the Fiji window to the front</li>
<li><code>[Window > Tile]</code> command is very useful when opening multiple images</li>
<li data-fragment-index="1" class="fragment">Info:
<ul><li>infobar (right top): gives info on the image</li>
<li>statusbar (right bottom): gives current cursor coordinates and intensity readout</li></ul>
</ul>
</div>
<img data-fragment-index="1" class="fragment third" src="img-ia/fiji8.png"/>
</section>
<section data-state="fiji1"><style>.fiji1 header:after { content: "Introducing ImageJ and Fiji"; }</style>
<h2>A word about updating</h2>
<ul>
<li>Fiji includes a built-in updater mechanism, which may prompt you at launch:</li>
<img src="img-ia/fiji_updater_1.png"/>
<li>You can access it using <code>[Help > Update...]</code></li>
<li>This will also update installed plugins</li>
<li>In the middle of a project, best to be conservative and not update—barring bugs</li>
<li>Note: you can duplicate your Fiji and have a backup!</li>
</ul>
</section>
<section data-menu-title="Fiji Basics" data-state="fiji2z"><style>.fiji2z header:after { content: ""; }</style>
<h1>Hands on With Fiji</h1>
<h4>Getting to know the interface, info & status bars, calibrated vs non-calibrated images</h4>
</section>
<section data-menu-title="Doing the exercises" data-state="fiji2a"><style>.fiji2a header:after { content: "Doing the exercises"; }</style>
<p>Exercises will be provided in-line, as links to PDFs—right-click and open in a new tab</p>
<p>Commands on the Fiji menu will look like: <code>[File > Save]</code></p>
<p>Sample/exercise data will look like this: <a href="material/01-Photo.tif"><code>01-Photo.tif</code></a>
<br>Right-click to copy the URL and use <code>[File > Import > URL...]</code> to open</p>
<img class="half" src="img-ia/material_01.png"/>
<img class="half" src="img-ia/material_02.png"/>
<p>(Paste in the URL in the resulting box)</p>
</section>
<section data-state="fiji2"><style>.fiji2 header:after { content: "Fiji Basics"; }</style>
<h2>Exercise 1</h2>
<ol>
<li>Open <code><a href="material/Task1.pdf">Task1.pdf</a></code> and follow the instructions there.</li>
<li>You will need these two images: <code><a href="material/01-Photo.tif">01-Photo.tif</a></code> and <a href="material/02-Biological_Image.tif"><code>02-Biological_Image.tif</code></a></li>
</section>
<section data-state="fiji2"><style>.fiji2a header:after { content: "Fiji Basics: Calibration"; }</style>
<h2>Calibration</h2>
<div class="half left">
<ul>
<li>The Infobar is a great way to tell if your image is calibrated</li>
<li>Running <code>[Image > Properties]</code> also allows you to view and set calibration</li>
<li>The spatial calibration can be in any unit you like but (almost) all subsequent measurements will use that unit!</li>
<li>For μm, use <code>um</code> or <code>micron</code></li>
<li>Or use whatever domain specific unit, even <code>dolphins</code></li>
</ul>
</div>
<div class="half right">
<img src="img-ia/fiji9.png"/>
</div>
</section>
<!--END of TASK 1 -->
<section data-menu-title="Basic Adjustments: Intensity" data-state="fiji3az"><style>.fiji3az header:after { content: ""; }</style>
<h1>Basic Manipulations</h1>
<h4>Intensity and Geometric adjustments</h4>
</section>
<!-- Add histogram stuff here -->
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p class="">Images are an array of intensity values. The intensity histogram shows the number (on the y-axis) of each intensity value (on the x-axis) and thus the distribution of intensities</p>
<img class="half" src="img-ia/intensity_10.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p>Photos typically have a broad range of intensity values and so the distribution of intensities varies greatly</p>
<img class="twothirds" src="img-ia/intensity_11.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p>Fluorescent micrographs will typically have a much more predictable distribution:</p>
<img class="twothirds" src="img-ia/intensity_12.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p>The Black and White points of the histogram dictate the bounds of the display (changing these values alters the brightness and contrast of the image)
<br>They are often called "the contrast limits"
</p>
<img class="twothirds" src="img-ia/intensity_13a.png"/>
<ul><li>Brightness: horizontal position of the display window</li>
<li>Contrast: distance between the black and white point</li></ul>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<img class="half" src="img-ia/intensity_13.png"/>
<p data-fragment-index="1" class="fragment">The histogram is now stretched and the intensity value of every pixel is effectively doubled which increases the contrast in the image</p>
<img data-fragment-index="1" class="fragment half" src="img-ia/intensity_14a.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p>If we repeat the same manipulation, the maximum intensity value in the image is now outside the bounds of the display scale!</p>
<img class="twothirds" src="img-ia/intensity_14.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<p>Values falling beyond the new White point are dumped into the top bin of the histogram (IE 256 in an 8-bit image) and information from the image is lost
<br>This is often called "clipping"
</p>
<img class="twothirds" src="img-ia/intensity_15.png"/>
</section>
<section data-state="fiji3p"><style>.fiji3p header:after { content: "Understanding Intensity Histograms"; }</style>
<img class="left third" src="img-ia/intensity_16.png"/>
<div class="right twothirds">
<p>Be careful when <b>applying</b> changes to contrast limits, as they will change the pixel values!
<p>Be warned: removing information from an image is deemed an unacceptable maniplulation and can constitute academic fraud!</p>
<p>For an excellent (if slightly dated) review of permissible image manipulation see:</br><a target="_blank" href="https://doi.org/10.1083/jcb.200406019">Rossner & Yamada (2004): "What's in a picture? The temptation of image manipulation"</a></p>
</div>
<p class="clear">The best advice is to get it right during acquisition and make sure you compare apples to apples</p>
</section>
<!--BEGINNING of TASK 2 -->
<section data-state="fiji3a"><style>.fiji3a header:after { content: "Basic Adjustments: Intensity"; }</style>
<div>
<h2>Exercise 2</h2>
<ul>
<li>Open <code><a href="material/Task2.pdf">Task2.pdf</a></code> and follow the instructions there.</li>
<li>You will need this image: <a href="material/02-Biological_Image.tif"><code>02-Biological Image.tif</code></a></li>
</ul>
</section>
<!--END of TASK 2 -->
<!-- Consider talking about acceptable adjustments? -->
<section data-menu-title="Measurements" data-state="fiji3z"><style>.fiji3z header:after { content: ""; }</style>
<h1>Measurements and scale bars</h1>
<h4>Making measurements, what to measure, line vs area, adding a scale bar</h4>
</section>
<section data-state="fiji3z"><style>.fiji3 header:after { content: "Measurements"; }</style>
<div class="left half">
<li>The selection tools can be used to draw/mark regions of interest that can be measured
<li><code>[Analyze > Measure]</code> (or `m` keyboard shortcut) is used to make measurements</li>
</ul>
</div>
<div class="right half">
<img src="img-ia/fiji_meas02.png"/></div>
<p class="clear fragment">The measurements provided are set via <code>[Analyze > Set Measurements...]</code> except for selection-specific measurements (length, angle, coords)</p>
</section>
<section data-state="fiji3"><style>.fiji3 header:after { content: "ROI Manager"; }</style>
<ul>
<li><code>[Analyze > Tools > ROI Manager...]</code> to open the ROI Manager</li>
<li>After making a selection (any type), press `Add` in the ROI Manager or hit 't' or run <code>[Edit > Selection > Add to Manager]</code>
<li>Repeat as needed for your ROI</li>
<li class="fragment" data-fragment-index="1">Run <code>[More > Multi-measure]</code></li>
<li class="fragment" data-fragment-index="3">Use <code>[More > Save]</code> for better data provenance!</li>
</ul>
<img class="third" src="img-ia/fiji_roi1.png"/>
<img data-fragment-index="2" class="third fragment" src="img-ia/fiji_roi2.png"/>
</section>
<!--BEGINNING of TASK 3 -->
<section data-state="fiji3z"><style>.fiji3z header:after { content: "Measurements"; }</style>
<div>
<h2>Exercise 3</h2>
<ul>
<li>Open <code><a href="material/Task3.pdf">Task3.pdf</a></code> and follow the instructions there.</li>
<li>You will need this image: <a href="material/02-Biological_Image.tif"><code>02-Biological Image.tif</code></a></li>
</ul>
</section>
<!--END of TASK 3 -->
<section data-state="fiji3z"><style>.fiji3z header:after { content: "Measurements"; }</style>
<h2>What if my image is uncalibrated?</h2>
<div class="half left">
<ul>
<li class="fragment" data-fragment-index="1">If you know the pixel size, use <code>[Image > Properties...]</code></li>
<img class="fragment" data-fragment-index="1" src="img-ia/image_properties.png"/>
</ul>
</div>
<div class="half right">
<ul>
<li class="fragment" data-fragment-index="2">If you have a reference, mark it with the Line tool and use <code>[Analyze > Set Scale...]</code></li>
<img class="fragment" data-fragment-index="2" src="img-ia/analyze_set_scale.png"/>
</ul>
</div>
</section>
<section data-menu-title="Stacks" data-state="fiji5z"><style>.fiji5z header:after { content: ""; }</style>
<h1>Stacks</h1>
<h4>Understanding how Fiji deals with multidimensional images</h4>
</section>
<section data-state="fiji5"><style>.fiji5 header:after { content: "Stacks"; }</style>
<p>Some file formats (eg. TIF) can store multiple images in one file which are called stacks</p>
<img class="third" src="img-ia/stacks_01.png"/>
<img data-fragment-index="1" class="twothirds fragment" src="img-ia/stacks_02.png"/>
<p class="fragment" data-fragment-index="1">When more than one dimension (time, z, channel) is included, the images are still stored in a linear stack so it's critical to know the dimension order (eg, XYCZT, XYZTC etc) so you can navigate the stack correctly.</p>
</section>
<section data-state="fiji5"><style>.fiji5 header:after { content: "Stacks"; }</style>
<p>You will very rarely have to deal with Interleaved stacks because of <b>Hyperstacks</b> which give you independent control of dimensions with additional control bars.</p>
<img class="third" src="img-ia/hyperstacks_01.png"/>
<img data-fragment-index="1" class="third fragment" src="img-ia/hyperstacks_02.png"/>
<p class="fragment" data-fragment-index="1">Convert between stack types with the <code>[Image > Hyperstack]</code> menu</p>
</section>
<section data-menu-title="Channel Display Modes" data-state="fiji6"><style>.fiji6 header:after { content: "Channel Display Modes"; }</style>
<h2>Multichannel images are handled as stacks</h2>
<p>Interacting with channels is so common that there is a dedicated Channels Tool for additional controls:</p>
<ul><li><code>[Image > Color > Channels Tool]</code></li>
<p>Other useful menu options:</p>
<li><code>[Image > Type > RGB Color]</code>: convert from 3 channel stack to RGB</li>
<li><code>[Image > Type > RGB Stack]</code>: split RGB image into 3 channel stack</li>
</ul>
</section>
<!--BEGINNING of TASK 4 -->
<section data-state="fiji6"><style>.fiji6 header:after { content: "Channel Display Modes"; }</style>
<h2>Exercise 4</h2>
<ul>
<li>Open <code><a href="material/Task4.pdf">Task4.pdf</a></code> and follow the instructions there.</li>
<li>You will need this image: <a href="material/06-multichannel.tif"><code>06-MultiChannel.tif</code></a></li>
</ul>
</section>
<!--END of TASK 4 -->
<section data-menu-title="Digital Imaging and Color" data-state="fiji7z"><style>.fiji7z header:after { content: ""; }</style>
<h1>Color in Digital Imaging</h1>
<h4>What is color? How and when to use LUTs</h4>
</section>
<section data-state="fiji7"><style>.fiji7 header:after { content: "Colour"; }</style>
<p>Color in your images is (almost always) dictated by arbitrary lookup tables</p>
<img class="half" src="img-ia/colour_02.png"/>
<img data-fragment-index="1" class="third fragment" src="img-ia/colourLUT1.png"/>
<p class="fragment" data-fragment-index="1">Lookup tables (LUTs) translate an intensity (1-256 for 8 bit) to an RGB display value</p>
</section>
<section data-state="fiji7"><style>.fiji7 header:after { content: "Colour"; }</style>
<p>Color in your images is (almost always) dictated by arbitrary lookup tables</p>
<img class="third" src="img-ia/colourLUT2.png"/>
<img data-fragment-index="1" class="third fragment" src="img-ia/colourLUT3.png"/>
<p>Lookup tables (LUTs), also called "colormaps" translate an intensity (1-256 for 8 bit) to an RGB display value</p>
</section>
<section data-state="fiji7"><style>.fiji7 header:after { content: "Colour"; }</style>
<p>You can use whatever colours you want (they are arbitrary after all), but the most reliable contrast is greyscale</p>
<img src="img-ia/colour_05.png"/>
<p class="subtle">More info on color and sensitivity of the human eye <a href="https://postacquisition.wordpress.com/2015/04/15/see-the-world-in-black-and-white/" target="_blank">here</a></p>
<!-- <ol><li>Combinations for multichannel images</li><li>Color Blindness</li></ol> -->
</section>
<section data-state="fiji8"><style>.fiji8 header:after { content: "Colour: Combinations"; }</style>
<p>Additive and Subtractive Colours can be mixed in defined ways</p>
<img class="half" src="img-ia/colour_06.png"/>
<p>Non 'pure' colours cannot be combined in reliable ways (as they contain a mix of other channels)
</section>
<section data-state="fiji8"><style>.fiji8 header:after { content: "Colour: Combinations"; }</style>
<p>BUT! Interpretation is <i>highly</i> context dependent!</p>
<a href="https://twitter.com/dn_mason/status/1034380257451810816" target="_blank"><img class="third" src="img-ia/colour_07.png"/></a><img class="third" src="img-ia/colour_08.png"/><img data-fragment-index="1" class="third fragment" src="img-ia/colour_11.png"/>
<p data-fragment-index="1" class="fragment"><a href="https://en.wikipedia.org/wiki/The_dress">https://en.wikipedia.org/wiki/The_dress</a></p>
</section>
<section data-state="fiji8"><style>.fiji8 header:after { content: "Colour: Combinations"; }</style>
<p>Open <a href="material/05-BlueGreenSwirl.png"><code>05-BlueGreenSwirl.png</code></a></p>
<img src="img-ia/colour_09.png"/>
</section>
<section data-state="fiji8b"><style>.fiji8b header:after { content: "Colour: R/G color blindness"; }</style>
<p>~10% of the population have trouble discerning Red and Green. Consider using Green and Magenta instead which still combine to white.</p>
<img src="img-ia/colour_10.png"/>
</section>
<!--BEGINNING of TASK 5 -->
<section data-state="fiji14a"><style>.fiji14a header:after { content: "Colour: Changing LUTs"; }</style>
<div>
<h2>Exercise 5</h2>
<ul>
<li>Open <code><a href="material/Task5.pdf">Task5.pdf</a></code> and follow the instructions there.</li>
<li>You will need this image: <a href="material/06-multichannel.tif"><code>06-MultiChannel.tif</code></a></li>
</ul>
</div>
</section>
<!--END of TASK 5 -->
<section data-state="fiji14a"><style>.fiji14a header:after { content: "Colour: Changing LUTs"; }</style>
<p>A couple of useful LUTs:</p>
<img class="threequart" src="img-ia/colourLUT7.png"/>
</section>
<!-- ---------------------- APPLICATIONS JUMP PAGE -------------------------- -->
<section data-menu-title="Applications: Index Page" data-state="apps90"><style>.apps90 header:after { content: ""; }</style>
<p>Applications</p>
<ul>
<li><a href="#/Segmentation">Segmentation</a></li>
<li><a href="#/Colocalisation">Colocalisation</a></li>
<li><a href="#/Tracking">Tracking</a></li>
<li><a href="#/Stitching">Stitching</a></li>
<li><a href="#/Batch">Batch Processing</a></li>
</ul>
</section>
<!-- ---------------------- APPLICATIONS SEGMENTATION AND CCA -------------------------- -->
<section id="Segmentation" data-menu-title="Segmentation" data-state="apps10z"><style>.apps10z header:after { content: ""; }</style>
<h1>Applications: Segmentation</h1>
<h4>What is segmentation? thresholding, Connected Component Analysis</h4>
</section>
<section data-state="apps10"><style>.apps10 header:after { content: "Segmentation: Theory"; }</style>
<p>Segmentation is the separation of an image into regions of interest<br>
<i>Semantic</i> segmentation assigns each pixel to a <i>class</i>, e.g. foreground vs. background</p>
<div class="left half">
<img height="387" width="365" src="img-ia/seg_03.png"/>
</div>
<div class="right half"><img data-fragment-index="1" height="387" width="365" class="fragment" src="img-ia/seg_04.png"/>
</div>
<p class="clear fragment">The end point for most segmentation is a binary mask (false/true, 0/255)</p>
</section>
<section data-state="apps10y"><style>.apps10y header:after { content: "Segmentation: Before we start"; }</style>
<p>Fiji has an odd way of dealing with masks</p>
<img class="third" src="img-ia/setupFiji1.png"/>
<img class="third" src="img-ia/setupFiji2.png"/>
<p>Run <code>[Process > Binary > Options]</code> and check <code>Black Background</code>. Hit OK.</p>
</section>
<section data-state="apps10"><style>.apps10 header:after { content: "Segmentation: Theory"; }</style>
<p>For most applications, intensity-based thresholding works well. This relies on the signal being higher intensity than the background.</p>
<img class="half" src="img-ia/seg_05.png"/>
<p>We use a <i>Threshold</i> to pick a cutoff.</p>
</section>
<section data-state="apps10"><style>.apps10 header:after { content: "Segmentation: Theory"; }</style>
<div class="left half">
<p>A background/foreground binary mask (false/true, 0/255) may be sufficient for some analysis.</p>
<img src="img-ia/seg_09.png"/>
</div>
<div class="fragment right half">
<p>Or we may want to identify individual objects (instance segmentation)</p>
<img src="img-ia/seg_CCA_5.png"/>
</div>
</section>
<section data-state="apps10"><style>.apps10 header:after { content: "Segmentation: Theory"; }</style>
<p>One approach to identifying individual objects when given a binary mask is <i>Connected Component Analysis/Labeling</i> (CCA)</p>
<p>This approach assigns pixels that are touching (connected) to individual object:</p>
<table>
<tr><td>4-way connected<br>
<code>
- + -<br>
+ + +<br>
- + -<br>
</code>
</td>
<td>8-way connected<br>
<code>
+ + +<br>
+ + +<br>
+ + +<br>
</code></td>
</table>
<p>In Fiji this can be accomplished using <code>[Analyze > Analyze Particles...]</code>
<p>If CCA results in merged <i>objects</i> due to touching, then "watershed" approach is frequently used to define boundaries.</p>
</section>
<!--BEGINNING of TASK 6 -->
<section data-state="apps11"><style>.apps11 header:after { content: "Segmentation: Hands On"; }</style>
<h2>Exercise 6</h2>
<p>Open <code><a href="material/Task6.pdf">Task6.pdf</a></code> and follow the instructions there.</p>
<p>You will need these images: <a href="material/07-nuclei.tif"><code>07-nuclei.tif</code></a> and <a href="material/08-nucleiMask.tif"><code>08-nucleiMask.tif</code></a></p>
</section>
<section data-menu-title="Segmentation: measurements" data-state="apps13"><style>.apps13 header:after { content: "Segmentation: Making Measurements"; }</style>
<p>Analyze Particles comes with the option to <code>Display Results</code></p>
<img class="third left" src="img-ia/seg_CCA_6.png"/>
<img data-fragment-index="2" class="third left fragment" src="img-ia/seg_CCA_8.png"/>
<img class="third fragment left" data-fragment-index="1" src="img-ia/seg_CCA_7.png"/>
<ul><li>The results table will have a column for anything selected in <code>[Analyze > Set Measurements]</code> and one row per object</li>
<li>Measurements (including intensity - labelled purple above) are made on the mask!</li></ul>
</section>
<section data-state="apps13"><style>.apps13 header:after { content: "Segmentation: Making Measurements"; }</style>
<p>To apply measurements to the original image: check <code>Add to Manager</code> in Analyze Particles, open the <a href="material/07-nuclei.tif"><code>original image</code></a>, then run <code>[More > Multi Measure]</code></p>
<img class="third" src="img-ia/seg_CCA_9b.png"/>
<img class="third fragment" src="img-ia/seg_CCA_9.png"/>
<img class="third fragment" src="img-ia/seg_CCA_9d.png"/>
<p>Don't forget <code>[Analyze > Set Measurements]</code> to pick parameters</p>
</section>
<section data-menu-title="Segmentation: visualization" data-state="apps14"><style>.apps14 header:after { content: "Segmentation: Visualisation"; }</style>
<p>You may want to create an output or display image showing the results of CCA or segmentation. Analyze particles has several useful outputs:</p>
<img class="third" src="img-ia/seg_CCA_10a.png"/>
<img class="third fragment" src="img-ia/seg_CCA_10.png"/>
<!-- <img class="third fragment" src="img-ia/seg_CCA_10b.png"/> -->
<p>Count masks are very useful in combination with <code>[Image > Look Up Tables > Glasbey]</code>-style (IE random) LUTs</p>
</section>
<!-- ---------------------- APPLICATIONS COLOCALISTATION -------------------------- -->
<section id="Colocalisation" data-menu-title="Colocalisation Analysis" data-state="apps30z"><style>.apps30z header:after { content: ""; }</style>
<h1>Applications: Colocalisation</h1>
<h4>Use cases, some simple guidance, JaCoP</h4>
</section>
<section data-state="apps30"><style>.apps30 header:after { content: "Colocalisation: Theory"; }</style>
<!-- <p>Colocalisation: the bane of Image Analysts</p> -->
<img class="half" src="img-ia/coloc_00.png"/>
<p class="subtle">Adapted from a slide by <a href="https://twitter.com/fab_cordelieres" target="_blank">Fabrice Cordelieres</a></p>
<p>For more rigor, see: <a href="https://journals.biologists.com/jcs/article/131/3/jcs211847/77151/Image-co-localization-co-occurrence-versus">Aaron et al. J Cell Sci (2018) 131 (3): jcs211847.</a>, <a href="https://cob.silverchair-cdn.com/cob/content_public/journal/jcs/131/3/10.1242_jcs.211847/9/jcs21184704.jpeg?Expires=1725605004&Signature=H4oE66qH-7si8hn9JJwFT8bi0Mrfs2RYqG1yGV55sisX1XEiVd0WugBSYAYJlkWzDKSwKHUtYPebzk6cQNjho7cxHJvIv~yHcC0qnT2EgpUWbSd9tXp9pNrZ1ZFQwUau4JogoAP3RvlcXV8GkPQ4S~o8keXPVjxcGw9C18jT3MS60Z39kvehxK484Rv8gGhmDa25jqA4qYxMLOK0s-CsleZUSPXtr3G1b-5MpquJ0EX16UonVGSZESDxF-3U33tvM88ZTCKEqLjEgewScYdnlAPk8Z3n180GNw3L9A2HJJ1c1UTLIXtoFdWnkh3~CTHdUW2NfiKZ6kBwZKLQWlWgZQ__&Key-Pair-Id=APKAIE5G5CRDK6RD3PGA">Figure 4</a></p>
</section>
<section data-state="apps30"><style>.apps30 header:after { content: "Colocalisation: Theory"; }</style>
<p>Colocalisation is <u>highly</u> dependent upon resolution! Example:</p>
<img class="third" src="img-ia/coloc_02a.PNG"/><span> </span><img class="third fragment" src="img-ia/coloc_02b.png"/>
<p class="fragment">Same idea goes for cells. Keep in mind your imaging resolution!</p>
</section>
<section data-state="apps35"><style>.apps35 header:after { content: "Bolte and Cordelieres"; }</style>
<p>We will walk through using <a href="https://imagej.net/plugins/jacop">JaCoP (Just Another CoLocalisation Plugin)</a> to look at Pearson's and Manders' analysis<br> It's been revamped by the BIOP folks of EPFL: <a href="https://github.com/BIOP/ijp-jacop-b?tab=readme-ov-file#ijp-jacop-b">JaCoP-BIOP</a></p>
<p>The companion paper <a href="https://doi.org/10.1111/j.1365-2818.2006.01706.x" target="_blank">https://doi.org/10.1111/j.1365-2818.2006.01706.x</a></p>
<img class="half" src="img-ia/coloc_00a.png"/>
</section>
<section data-state="apps31"><style>.apps31 header:after { content: "Colocalisation: Pearson's Correlation Coefficient (PCC)"; }</style>
<h2>Pearson's Correlation Coefficient</h2>
<div class="third left">
<img src="img-ia/coloc_10.png"/>
</div>
<div class="twothirds right">
<ul>
<li>For each pixel, plot the intensities of two channels in a scatter plot</li>
<li>Ignore pixels with only one channel (IE intensity below BG)
<li>P value describes the goodness of fit (-1 to 1)</li>
<ul>
<li>1 = perfect correlation</li>
<li>0 = no positive or negative correlation</li>
<li>-1 = exclusion</li>
</ul></ul>
</div>
<p class="subtle clear"><br>Figure from <a href="https://doi.org/10.1111/j.1365-2818.2006.01706.x" target="_blank">https://doi.org/10.1111/j.1365-2818.2006.01706.x</a></p>
</section>
<section data-state="apps31"><style>.apps31 header:after { content: "Colocalisation: Pearson's Correlation Coefficient"; }</style>
<h2>Exercise: PCC</h2>
<div class="half left">
<img src="img-ia/11-coloc-jacop.png"/>
</div>
<div class="half right">
<ul>
<li>Download <a href="material/JACoP_B-1.2.0.jar"><code>JaCoP-BIOP plugin</code></a></li>
<li>Run <code>[Plugins > Install...]</code>, point to the downloaded jar file, then press "Save" to confirm</li>
<li>Restart Fiji</li>
</ul>
</div>
</section>
<section data-state="apps31"><style>.apps31 header:after { content: "Colocalisation: Pearson's Correlation Coefficient"; }</style>
<div class="third left">
<img src="img-ia/coloc_11.png"/>
</div>
<div class="twothirds right">
<ul>
<li>Open <a href="material/11-coloc-multichannel.tif"><code>11-coloc-multichannel.tif</code></a>.
<br>This is a multichannel version of the images to the left; use the <code>[Image > Color > Channels tool]</code> command to examine the channels</li>
<li>Run <code>[Plugins > BIOP > Image Analysis > BIOP JaCoP]</code></li>
<li>Uncheck everything except `Get Pearsons Correlation`.</li>
<li>At the top, select different channels, by number, for `Channel A` and `Channel B`</li>
<li>Repeat for different combinations of pairs of channels.</li>
</ul>
</div>
</section>
<section data-state="apps32"><style>.apps32 header:after { content: "Colocalisation: Problems with Pearson's"; }</style>
<img class="left quart" src="img-ia/coloc_10.png"/>
<ul class="twothirds">
<li>Great for complete colocalisation</li>
<li>Unsuitable if there is a lot of noise or partial colocalisation (see below)</li>
<li>Midrange P-values (-0.5 to 0.5) do not allow reliable conclusions to be drawn</li>
<li>Bleedthrough can be particularly problematic (as they will always correlate)</li>
</ul>
<br>
<img class="clear half" src="img-ia/coloc_12.png"/>
</section>
<section data-state="apps33"><style>.apps33 header:after { content: "Colocalisation: Manders'"; }</style>
<!-- <img class="twothirds" src="img-ia/coloc_13.png"/> -->
<h2>Manders' Overlap Coefficient</h2>
<ul class="twothirds">
<li>Removes some of the intensity dependence of Pearson's and provides channel-specific overlap coefficients (M1 & M2)</li>
<li>Values from 0 (no overlap) to 1 (complete overlap)</li>
<li>Defined as <i>"the ratio of the summed intensities of pixels from one channel for which the intensity in the second channel is above zero to the total intensity in the first channel"</i></li>
</ul>
</section>
<section data-state="apps33"><style>.apps33 header:after { content: "Colocalisation: Manders'"; }</style>
<h2>Exercise: Manders'</h2>
<div class="third left">
<img src="img-ia/coloc_11.png"/>
</div>
<div class="twothirds right">
<ul>
<li>Use the same multichannel image from last time (<a href="material/11-coloc-multichannel.tif"><code>11-coloc-multichannel.tif</code></a>)</li>
<li>Run <code>[Plugins > BIOP > Image Analysis > BIOP JaCoP]</code>, check both `Get Pearsons Correlation` and `Get Manders coefficients`</li>
<li>Run for different combinations of these images</li>
<li>Note the differences in coefficients especially in images 13 and 14</li>
<li class="fragment">[BONUS] add some noise <code>[Process > Noise > Add Noise]</code> or blur your images <code>[Process > Filters > Gaussian Blur]</code> and see how that affects the coefficients</li></ul>
</div>
</section>
<!-- ---------------------- APPLICATIONS TRACKING -------------------------- -->
<section id="Tracking" data-menu-title="Tracking" data-state="apps1z"><style>.apps1z header:after { content: ""; }</style>
<h1>Applications: Tracking</h1>
<h4>Correlating spatial and temporal phenomena, Feature detection, linkage, gotchas</h4>
</section>
<section data-state="apps1"><style>.apps1 header:after { content: "Tracking: Theory"; }</style>
<p>Life exists in the fourth dimension. Tracking allows you to correlate spatial and temporal properties.</p>
<img class="third" src="img-ia/tracks_01.png"/><span> </span><img data-fragment-index="2" class="third fragment" src="img-ia/tracks_02.png"/>
<p data-fragment-index="1" class="fragment">Most partcles look the same! Without any way to identify them, tracking is probabilistic.</p>
</section>
<section data-state="apps1"><style>.apps1 header:after { content: "Tracking: Theory"; }</style>
<p>Tracking has two parts: Feature Identification and Feature Linking</p>
<img class="half" src="img-ia/tracks_03.png"/><img class="half" src="img-ia/tracks_04.png"/>
<p>For every frame, features are detected, typically using a Gaussian-based method (eg. <a href="https://en.wikipedia.org/wiki/Blob_detection#The_difference_of_Gaussians_approach" target="_blank">Laplacian of Gaussian</a>: LoG)</p>
</section>
<section data-state="apps1"><style>.apps1 header:after { content: "Tracking: Theory"; }</style>
<p>Spots can be localised to sub-pixel resolution!</p>
<img class="left half" src="img-ia/tracks_05.png"/>
<p class="right half">Without sub-pixel localisation, the precision of detection is limited to whole pixel values.</p>
</section>
<section data-state="apps1"><style>.apps1 header:after { content: "Tracking: Theory"; }</style>
<p>Feature linkage</p>
<!-- <img class="half" src="img-ia/tracks_06.png"/><br> -->
<img class="half" src="img-ia/tracks_07.png"/>
<p>For each feature, all possible links in the next frame are calculated. This includes the spot disappearing completely.</p>
<img data-fragment-index="1" class="fragment half" src="img-ia/tracks_08.png"/>
<p data-fragment-index="2" class="fragment">A 'cost matrix' is formed to compare the 'cost' of each linkage. This is globally optimised to calculate the lowest cost for all linkages.</p>
</section>
<section data-state="apps1"><style>.apps1 header:after { content: "Tracking: Theory"; }</style>
<p>In the simplest form, a cost matrix will usually consider distance. Many other parameters can be used such as:</p>
<ul>
<li>Intensity</li>
<li>Shape</li>
<li>Quality of fit</li>
<li>Speed</li>
<li>Motion type</li>
</ul>
<p>Which can allow for a more accurate linkage especially in crowded or low S/N environments</p>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<h2>Exercise: Tracking</h2>
<p>Open <a href="material/10-tracks.tif"><code>10-tracks.tif</code></a><br>Hit the arrow to play the movie. Right Click on the arrow to set playback speed</p>
<img class="quart" src="img-ia/tracks_11.png"/>
<p class="subtle clear"><br>If you're interested in how the dataset was made see <a href="https://bitbucket.org/snippets/davemason/Ke9zz7" target="_blank">this snippet</a></p>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<p>Run <code>[Plugins > Tracking > Trackmate]</code></p>
<p class="subtle clear">If it's missing, download <a href="material/TrackMate-7.13.2.jar">the TrackMate plugin</a> and install it using <code>[Plugins > Install...]</code></p>
<div class="left half">
<img src="img-ia/trackmate_01.png"/>
</div>
<div class="right half">
<ul><li>Trackmate guides you through tracking using the Next and Prev buttons</li><li>The first dialog lets you select a subset (in space and time) to process. This is handy on large datasets when you want to calculate parameters before processing the whole dataset</li><li>Hit Next, keep the default (LoG) detector then hit Next, and advance the slides!</li></ul>
</div>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<div class="left half">
<img src="img-ia/trackmate_02.png"/>
</div>
<div class="right half">
<ul><li>Enter a Blob Diameter of 2 (note the scaled units)</li>
<li>Hit preview. Without any threshold, all the background noise is detected as features</li>
<li>Enter `0.1` for the `Quality threshold` and hit Preview again.</li>
</ul>
</div>
<p class="fragment clear">You should aim to set the minimum threshold that removes all noise.
<br>Slide the navigation bar, then hit Preview to check out a few other timepoints. When satisfied press Next and advance the slides!</p>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<div class="left half">
<img src="img-ia/trackmate_04.png"/>
</div>
<p class="half right">TrackMate will process the stacks.
<br>Once it's done, hit next, accepting defaults until you reach 'Select a <b>tracker</b>'</p>
<p class="clear">Ensure `Simple LAP tracker` is selected and hit Next, then advance the slides!</p>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<div class="left half">
<img src="img-ia/trackmate_05.png"/>
</div>
<div class="right half">
<p>In the 'Settings for Simple LAP tracker', set:</p>
<ul>
<li>`Linking max distance` to `5.0`</li>
<li>`Gap-closing max distance` to `5.0`</li>
<li>`Gap-closing max frame gap` to `0`</li>
</ul>
</div>
<p class="clear">Press Next and after processing, you should have tracks!</p>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<img class="left third" src="img-ia/trackmate_05.png"/>
<div class="twothirds right">
<p><code>Linking Max Distance</code> Sets a 'search radius' for linkage</p>
<img src="img-ia/tracks_09.png"/>
<p><code>Gap-closing Max Frame Gap</code> Allows linkages to be found in non-adjacent frames</p>
<img src="img-ia/tracks_10.png"/>
<p><code>Gap-closing Max Distance</code> Limits search radius in non-adjacent frames</p>
</div>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<p>Press Next to get to outputs from Trackmate: (1) Tracking data</p>
<div class="left half">
<img src="img-ia/trackmate_06.png"/>
</div>
<div class="right half">
<img src="img-ia/trackmate_08.png"/>
</div>
</section>
<section data-state="apps2"><style>.apps2 header:after { content: "Tracking: Hands On"; }</style>
<p>Press Next to get to outputs from Trackmate: (2) Movies!</p>
<div class="left half">
<img src="img-ia/trackmate_07.png"/>
</div>
<div class="right half">
<img src="img-ia/trackmate_09.gif"/>
</div>
<p class="clear">You may want adjust the Display Options to get the tracks drawing the way you want (e.g. try "Local, Backwards")</p>
</section>
<section data-state="apps3"><style>.apps3 header:after { content: "Tracking: Common Problems"; }</style>
<p>While simple, Tracking is not to be taken on lightly!</p>
<ul>
<li class="fragment">For the best results make sure the inter-particle distance is greater than the frame-to-frame movement. If not, try to increase resolution (more pixels) or decrease interval (more frames)</li>
<li class="fragment">The search radius increases processing time with HUGE datasets but in most case, has little effect on processing time. Remember that closer particles will still be linked preferably if possible.</li>
<li class="fragment">Keep it simple! Unless you have problems with noise, blinking, focal shifts and similar, do not introduce gap closing as this may lead to false-linkages</li>
<li class="fragment">'Simple LAP tracker' does not include merge/spliting events, however Trackmate ships with the more complex 'LAP Tracker' which can handle merge/splitting events (but keep in mind your system!)</li>
<li class="fragment">Quality control! Look at your output carefully and make sure you're not getting 'jumps' where one particle is linked to another incorrectly</li>
</ul>
</section>
<!-- ---------------------- APPLICATIONS STITCHING -------------------------- -->
<section id="Stitching" data-menu-title="Stitching" data-state="apps40z"><style>.apps40z header:after { content: ""; }</style>
<h1>Applications: Stitching</h1>
<h4>Resolution vs field size, stitching, using overlaps, issues and bugs</h4>
</section>
<section data-state="apps40"><style>.apps40 header:after { content: "Image Stitching"; }</style>
<p>Increasing <b>resolution</b> (via higher NA lenses) almost always leads to a reduced <b>field</b></p>
<img class="twothirds" src="img-ia/stitch_01.png"/>
<p>Often you will want both!</p>
</section>
<section data-state="apps40"><style>.apps40 header:after { content: "Image Stitching"; }</style>
<p>We can achieve this with tile scanning (IE. imaging multiple adjacent fields)</p>
<img class="twothirds" src="img-ia/stitch_02.png"/>
<p>Stitching is the method used to put them back together again.
<br>We'll use the <a href="https://imagej.net/plugins/image-stitching" target="_blank">Grid/Collection Stitching</a> plugin
</p>
</section>
<section data-state="apps41"><style>.apps41 header:after { content: "Image Stitching: no overlap"; }</style>
<h2>Exercise: No-overlap Stitching</h2>
<div class="left twothirds" style="font-size:80%">
<ul>
<li>Download and unzip <a href="material/Stitching_noOverlap.zip"><code>Stitching_noOverlap.zip</code></a> (make a note of the location)</li>
<li>Run <code>[Plugins > Stitching > Grid/Collection Stitching]</code></li>
<li>Select: Column by Column | Up & Right</li>, then press OK.
<li>Settings:
<ul><li>Grid Size: 2x2</li>
<li>Tile Overlap: 0</li>
<li>Directory: {path to your folder}</li>
<li>File Names for tiles: noOverlap_{iii}.tif</li>
<li>Uncheck all the options [OPTIONAL] Check `Add tiles as ROI`</li></ul>
</li>
<li>Hit OK (accept fast fusion)</li>
</ul>
<!-- <img class="third" src="img-ia/stitch_05.png"/> -->
</div>
<img class="third" src="img-ia/stitch_04.png"/>
</section>
<section data-state="apps41"><style>.apps41 header:after { content: "Image Stitching: no overlap"; }</style>
<img class="third" src="img-ia/stitch_06.png"/>
<img class="third fragment" src="img-ia/stitch_07.png"/>
<p class="fragment">Why do the images not line up?</p>
</section>
<section data-state="apps42"><style>.apps42 header:after { content: "Image Stitching: 10% overlap"; }</style>
<h2>Exercise: Stitching with Overlap</h2>
<ul>
<li>Open <a href="material/Stitching_Overlap.zip"><code>Stitching_Overlap.zip</code></a>. Unzip to the desktop.</li>
<li>Run <code>[Plugins > Stitching > Grid/Collection Stitching]</code> again</li>
<li>Use the same Grid settings (they should have been restored).</li>
<li>Set `Tile overlap` to `10%`</li>
<li>Update the Directory to the new path "Stitching_Overlap"</li>
<li>File Names for tiles: overlap_{iii}.tif</li>
<li>Ensure `Compute overlap` is checkeds</li>
<li>Hit OK</li>
</ul>
</section>
<section data-state="apps42"><style>.apps42 header:after { content: "Image Stitching: 10% overlap"; }</style>
<img class="third" src="img-ia/stitch_10.png"/>
<div class="half right">
<p>Two things to remember when using Grid/Collection Stitching:</p>
<ol>
<li>Default (R,G,B) LUTs are used after stitching</li>
<li>All calibration information is stripped</li>
<li>Stitching will have a harder time with sparse features or uneven illumination (<a href="https://postacquisition.wordpress.com/2015/06/17/its-a-stitch-up/" target="_blank">example in epilogue</a>)</li>
</ol>
</div>
</section>
<section data-state="apps43"><style>.apps43 header:after { content: "Image Stitching: Issues"; }</style>
<p>The most important point is to know your data!</p>
<ul>
<li>Grid layout (dimensions and order!)</li>
<li>Overlap</li>
<li>Calibration</li>
</ul>
</section>
<!-- ---------------------- APPLICATIONS BATCH PROCESSING -------------------------- -->
<section id="Batch" data-menu-title="Batch Processing" data-state="apps20z"><style>.apps20z header:after { content: ""; }</style>
<h1>Applications: Batch Processing</h1>
<h4>Why batch process? File conversion, batch processing, scripting</h4>
</section>
<section data-state="apps20"><style>.apps20 header:after { content: "Batch Processing: Theory"; }</style>
<p>Manual analysis (while sometimes necessary) can be laborious, error prone and not provide the provenance required. Batch processing allows the same processing to be run on multiple images.</p>
<p>The built-in <code>[Process > Batch]</code> menu has lots of useful functions:</p>
<img class="half" src="img-ia/batch_01.png"/>
</section>
<section data-state="apps21"><style>.apps21 header:after { content: "Batch Processing: Data"; }</style>
<p>We'll use a subset of dataset BBBC008 from the <a href="https://data.broadinstitute.org/bbbc/BBBC008/" target="_blank">Broad Bioimage Benchmark Collection</a></p>
<ul><li>Download the zip file from <a href="material/BBBC008_partial.zip">here</a> to the desktop</li><li>Unzip (right click and "Extract All") to end up with a folder on your desktop called <code>BBBC008_partial</code></li></ul><br>
<img class="" src="img-ia/batch_04.png"/>
<ul><li>Make another folder on the desktop called <code>Output</code></li><ul>
</section>
<!--BEGINNING of TASK 7 -->
<section data-state="apps22"><style>.apps22 header:after { content: "Batch Processing: Batch Convert"; }</style>
<h2>Exercise 7: Batch Convert</h2>
<ul><li>Ensure you have the the zip file <a href="material/BBBC008_partial.zip"><code>BBBC008_partial.zip</code></a> extracted to a known location and a that you have a second folder called "Output" next to it.
<li>Open <code><a href="material/Task7.pdf">Task7.pdf</a></code> and follow the instructions there.</li></ul>
</section>
<!--END of TASK 7 -->
<section data-menu-title="Macro Recorder" data-state="apps21"><style>.apps21 header:after { content: "Batch Processing: Macro Recorder"; }</style>
The Macro Recorder <code>[Plugins > Macros > Record...]</code>can enable you to generate simple macros without having to write them yourself.
<ul>
<li>With the Recorder open, (almost) every action you take in Fiji will be recorded as a macro command--this includes many Plugin functions!</li>
<li>The recorded Macros can be saved ("Create" button and Save) and then re-run <code>[Plugins > Macros > Run...]</code></li>
</ul>
<img src="img-ia/macro_recorder.png"/>
</section>
<!--BEGINNING of TASK 8 -->
<section data-state="apps22"><style>.apps22 header:after { content: "Batch Processing: Macro Recorder"; }</style>
<h2>Exercise 8: Macro Recorder</h2>
<ul><li>Ensure you have the the zip file <a href="material/BBBC008_partial.zip"><code>BBBC008_partial.zip</code></a> extracted to a known location and a that you have a second folder called "Output" next to it.
<li>Open <code><a href="material/Task8.pdf">Task8.pdf</a></code> and follow the instructions there.</li></ul>
</section>
<!--END of TASK 8 -->
<!-- Scripting 101 Start-->
<section data-menu-title="Scripting" data-state="apps24z"><style>.apps24z header:after { content: ""; }</style>
<h1>Scripting</h1>
<h4>A very brief foray into scripts</h4>
</section>
<section data-state="apps24"><style>.apps24 header:after { content: "Scripting"; }</style>
<p>Scripting is useful for running the same process multiple times or having a record of how images were processed to get a particular output</p>
<p>Fiji supports many scripting languages including Java, Python, Scala, Ruby, Clojure and Groovy through the script editor which also recognises the macro language from the previous example (which we'll be using)</p>
<!-- <p class="fragment" >Run <code>[Plugins > New > Macro]</code></p></div> -->
<img class="half fragment" src="img-ia/script01.PNG"/>
</section>
<section data-state="apps24"><style>.apps24 header:after { content: "Scripting"; }</style>
<p>As an example, we're going to (manually) create a montage from a three channel image, then see what the script looks like</p>
<img class="third" src="img-ia/script3.png"/>
<ul>
<li>Open <a href="material/06-multichannel.tif"><code>06-MultiChannel.tif</code></a></li>
<li>Open the macro recorder: <code>[Plugins > Macros > Record]</code></li>
</ul>
</section>
<section data-state="apps24"><style>.apps24 header:after { content: "Scripting"; }</style>
<div class="left twothirds">
<ul style="font-size:70%">
<li>(If necessary <code>[Image > Hyperstacks > Stack to Hyperstack]</code>)</li>
<li>Open the channels tool <code>[Image > Color > Channels Tool]</code> and set the mode to <code>grayscale</code></li>
<li>Run <code>[Image > Type > RGB color]</code></li>
<li>Rename this image to <code>channels</code> with <code>[Image > Rename]</code></li>
<li>Select the original stack, and using the channels tool, set the mode to <code>composite</code></li>
<li>Run <code>[Image > Type > RGB color]</code></li>
<li>Rename this image to <code>merge</code> with <code>[Image > Rename]</code></li>
<li>Close the original (it should be the only 8-bit image open (check the Info bar!)</li>
<li>Run <code>[Image > Stacks > Tools > Concatenate]</code> and select Channels and merge in the two boxes (see right)</li>
<li>Run <code>[Image > Stacks > Make Montage]</code> change the border width to 3 then hit OK</li>
<!-- <li>Run <code>[File > Save As > PNG]</code> and save the file in the output directory</li> -->
</ul>
</div>
<div class="third right">
<img src="img-ia/script02.png">
</div>
<p class="clear fragment">Got it? Have a look at the Macro Recorder and see if you can see the commands you ran</p>
</section>
<section data-state="apps24"><style>.apps24 header:after { content: "Scripting"; }</style>
<p>Open the script editor with <code>[File > New > Script]</code> and copy in the following code:</p>
<pre><code class="java" data-trim data-noescape>