TITLE: ilastik install and run for Syn Bot (Windows 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 Windows operating system.   

[STEPS]
1. 
 

1.1. If video quality is poor, try watching directly from Youtube at https://www.youtube.com/watch?v=ApOwcOFMUcg
SECTION: Installing ilastik
2. 0:00 - 1:30 Install ilastik by downloading it from ilastik.org/download and running the installer.
SECTION: Generate Training Images
3. 1:30 - 3:00 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. 3:00 - 4:00 Copy two-color training images to a training images folder
SECTION: Generate Training Images
5. 4:00 - 4:20 Make empty folder for holding red images and green images
SECTION: Generate Training Images
6. 4:20 - 4:32 Run extract_channels.ijm macro from the extra code folder on the SynBot GitHub repository
SECTION: Generate Training Images
7. 4:32 - 5:22 Select merged images folder, then red images folder, then green images folder
SECTION: Train ilastik model
8. 5:22 - 5:39 Open ilastik and start a new Pixel Classification project
SECTION: Train ilastik model
9. 5:39 - 6:01 Save the ilastik project file to a safe place where you can use it to threshold with SynBot
SECTION: Train ilastik model
10. 6:01 - 6:20 Click add new image and select the red training image (or images)
SECTION: Train ilastik model
11. 6:20 - 6:31 Click the "2. Feature Selection" drop down then "select features" and use Ctrl + A to select all features.
SECTION: Train ilastik model
12. 6:31 - 6:34 Click the "3. Training" drop down to advance
SECTION: Train ilastik model
13. 6:34 - 6:41 Zoom in image using Ctrl + + 
SECTION: Train ilastik model
14. 6:41 - 7: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. 7:21 - 7:37 Click Live Update to see a rendering of the ilastik model that will update when new markings are added. Use Ctrl + - to zoom out and check how well this model is working.
SECTION: Train ilastik model
17. 7:37 - 7:49 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. 7:55 - 9:37 Repeat steps 8-17 for the green channel image
SECTION: Run SynBot with ilastik thresholding
19. 9:37 - 9:51 Open and run SynBot.ijm
SECTION: Run SynBot with ilastik thresholding
20. 9:51 - 10:14 Enter your analysis parameters, including the ilastik thresholding method.
SECTION: Run SynBot with ilastik thresholding
21. 10:14 - 10:29 Select ilastik.exe application location. On Windows this will typically be in a path like C:/Program Files/ilastik1.4.0/ilastik.exe
SECTION: Run SynBot with ilastik thresholding
22. 10:29 - 10:34 Select the ilastik project file for thresholding the red channel.
SECTION: Run SynBot with ilastik thresholding
23. 10:34 - 10:40 Select the ilastik project file for thresholding the green channel.
SECTION: Run SynBot with ilastik thresholding
24. 10:40 - 10:42 Enter the threshold of ilastik confidence to use for the analysis. ilastik will give a confidence 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. 10:42 - 12:14 View results
SECTION: Train ilastik model
15. 7:05 - 7:21 Click Label 2 and use this to label some examples of background regions.