Fiji Measurement

From Microbial Ecology and Evolution Lab Wiki
Revision as of 12:56, 16 December 2022 by Ekhgn0 (talk | contribs) (6 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Taking Sterile Photos:


1. Use a white piece of paper as a background and place a 4 cm length of tape next to the outline of the base of a box.

2. Open the box in the sterile hood and place it in the outline of the box.

3. Place the specific label of the box (taped on the bottom) on the white piece of paper in the frame.

4. Take a photo using the ipad camera and measuring it from 8 inches up.

5. Place the lid back on the container and remove it from the sterile work place.

6. Repeat steps 2-5 for all of the boxes in the collection and send to a desktop with Fiji software.

Configuring the Photos

1. Download and save all of the images from the collection.

2. Label each of the images with the box title (on the piece of tape).

3. Crop the image to just include the dirt. DO NOT manipulate the sizing or the lighting of the image.

Note: It is important that the plastic of the box is not included in the image as this will interfere with the Fiji batch software. If the plastic is unable to be removed as the leaves overlap with the plastic then make a note of that image to check the code.

5. Create a desktop input folder and and an empty output folder that are labeled with the date and experiment.


Running the Fiji Batch Code

1. Open Fiji.

2. Open "Process"-> "Batch"-> "Macro"

3. Use the "Input" button to open the new input folder.

4. Use the "Output" button to open the new output folder.

5. Choose the "Output format" to be "8-bit TIFF"

6. Copy and paste the below Macro code into the box depending on if it has a soil background (a) or an agar background (b).

 a) Code for Soil Batch 
   run("Set Measurements...", "area limit display redirect=None decimal=2");
   run("Set Scale...", "distance=644.0124 known=4 unit=cm");
   run("Invert");
   title = getTitle();
   run("Split Channels");
   selectWindow("" + title + " (green)");
   selectWindow("" + title + " (blue)");
   close();
   selectWindow("" + title + " (red)");
   close();
   run("Subtract Background...", "rolling=10 light create");
   setOption("BlackBackground", true);
   run("Convert to Mask");
   run("Remove Outliers...", "radius=50 threshold=50 which=Bright");
   setAutoThreshold("Default dark");
   //run("Threshold...");
   run("Measure");.
   b) Code for Agar 
   run("Set Scale...", "distance=148.1713 known=1 unit=cm ");
   run("Set Measurements...", "area limit display redirect=None decimal=2");
   setOption("BlackBackground", true);
   run("Convert to Mask");
   setAutoThreshold("Default dark");
   //run("Threshold...");
   setThreshold(129, 255);
   run("Measure");.

7. Press "Test" to run the program for one of the photos and then "Process" to run all of the photos.


Verifying and Exporting the Data

1. The images will be saved to the output folder while the measurements can both be copied into an excel sheet and saved as a file to the output folder.

2. Check the output numbers for obvious outliers which should be checked through comparing the output and the input images.

3. Check the photos through looking through each image in the output folder to see if there are extraneous white spots (that are not leaves) or if there are leaves missing. Compare these images that do not look correct and compare them to the original image from the input folder.

4. Save input and output images to a google photo folder and then delete the images from desktop.