TITLE: ilastik install and run for Syn Bot (Mac Version)
AUTHORS: Justin T Savage

[DESCRIPTION]
Video instructions for installing ilastik, training an ilastik project, and using the ilastik project for simple SynBot run for Mac operating system.   

[STEPS]
1. 
 

SECTION: Installing ilastik
2. 0:00 - 1:00 Install ilastik by downloading it from ilastik.org/download and running the installer. To run ilastik after initial installation, right-click the application and click open. You will then be prompted to open the application even though it is from an unrecognized developer. 
SECTION: Generate Training Images
3. 1:00 - 2:38 Generate training images by running SynBot on a set of images so that any preprocessing steps will be the same as a SynBot run.
SECTION: Generate Training Images
4. 2:38 - 3:15 Copy two-color training images to a training images folder
SECTION: Generate Training Images
5. 3:15 - 3:30 Make empty folder for holding red images and green images
SECTION: Generate Training Images
6. 3:30 - 3:50 Run extract_channels.ijm macro from the extra code folder on the SynBot GitHub repository
SECTION: Generate Training Images
7. 3:50 - 4:40 Select merged images folder, then red images folder, then green images folder
SECTION: Train ilastik model
8. 4:40 - 4:58 Open ilastik and start a new Pixel Classification project
SECTION: Train ilastik model
9. 4:58 - 5:09 Save the ilastik project le to a safe place where you can use it to threshold with SynBot
SECTION: Train ilastik model
10. 5:09 - 5:25 Click add new image and select the red training image (or images)
SECTION: Train ilastik model
11. 5:25 - 5:35 Click the "2. Feature Selection" drop down then "select features" and use Ctrl + A to select all features. 
SECTION: Train ilastik model
12. 5:35 - 5:37 Click the "3. Training" drop down to advance
SECTION: Train ilastik model
13. 5:37 - 5:40 Zoom in image using Cmnd + +
SECTION: Train ilastik model
14. 5:40 - 6:05 Use the Label 1 to mark several examples of foreground puncta. Only a handful are needed to get started.
SECTION: Train ilastik model
16. 6:12 - 6:21 Click Live Update to see a rendering of the ilastik model that will update when new markings are added. Use Cmnd + - to zoom out and check how well this model is working.
SECTION: Train ilastik model
17. 6:21 - 6:30 Save the ilastik project. This saved model will be used by SynBot and you do not need to change anything in the steps 4 or 5 in the ilastik pipeline.
SECTION: Train ilastik model
18. 6:30 - 8:01 Repeat steps 8-17 for the green channel image
SECTION: Run SynBot with ilastik Thresholding
19. 8:01 - 8:43 Open and run SynBot.ijm. Move ilastik to your applications folder. FIJI may not have permission to access ilastik otherwise.
SECTION: Run SynBot with ilastik Thresholding
20. 8:43 - 8:59 Enter your analysis parameters, including the ilastik thresholding method.
SECTION: Run SynBot with ilastik Thresholding
21. 8:59 - 9:15 Select ilastik.app application location. On Mac this will typically be in a path like ~/Applications/ilastik-1.4.0.app
SECTION: Run SynBot with ilastik Thresholding
22. 9:15 - 9:20 Select the ilastik project file for thresholding the red channel.
SECTION: Run SynBot with ilastik Thresholding
23. 9:20 - 9:25 Select the ilastik project file for thresholding the green channel.
SECTION: Run SynBot with ilastik Thresholding
24. 9:25 - 9:30 Enter the threshold of ilastik condence to use for the analysis. ilastik will give a condence score from 0 to 1 of how likely the given pixel is part of the foreground. A good threshold is something between 0.5 and 0.9.
SECTION: Run SynBot with ilastik Thresholding
25. 9:30 - 10:30 View results
1.1. If video quality is poor, try watching directly from Youtube at https://www.youtube.com/watch?v=NiNJ48GOABo
SECTION: Train ilastik model
15. 6:05 - 6:12 Click Label 2 and use this to label some examples of background regions.