TITLE: Capturing and Processing Slaking Images With a Multi-Well Plate
AUTHORS: Claire Phillips, robert.meadows

[DESCRIPTION]
This describes a process to measure soil wet aggregate stability through slaking, or rapid immersion it water. It uses a multi-well plate to process many aggregates at one time. Air dry, pea-sized aggregates (3-10 mm) are submerged in water and time lapse images are collected with a web cam to measure their dispersion (slaking) over 10 minutes. Image-J software is used to measure the projected area of the aggregates over time. The user calculates a slaking index from the change in projected area of the aggregates.

[BEFORE_START]
Obtain a soil sample containing at least 20 pea-sized aggregates and air dry it.

[GUIDELINES]
This method is suitable for soils with moderate to high wet aggregate stability. It is not suitable for highly unstable aggregates that are likely to completely disintegrate when submerged.

[STEPS]
SECTION: Sample preparation
2. Establish how you will count the wells (across or down) and create a spreadsheet identifying the sample in each well. 
Example Document:   

SECTION: Sample preparation
2.1. The well plate we provided a 3D print file for has a notch in the upper left corner to identify the first column and row.  

SECTION: Sample preparation
3. Make sure the tray is clean and dry, and the mesh is secured to the bottom (no tears or gaps).
SECTION: Sample preparation
4. Place an air-dried pea-sized aggregate (3-10 mm in diameter) in the center of each well.  

SECTION: Use webcam to collect images
5. In Microsoft Windows, type camera into search bar to find Camera app
SECTION: Use webcam to collect images
6. In the Camera app, select the correct webcam by toggling the rotate camera icon in the upper right corner.  

SECTION: Use webcam to collect images
7. Take a reference image of the dry aggregates. 
  

SECTION: Use webcam to collect images
7.1. Adjust the brightness as needed to ensure strong contrast between the aggregates and the background.
SECTION: Use webcam to collect images
7.2. Draw a light line in permanent marker around the well plate so you can return it to the same location consistently.  

SECTION: Use webcam to collect images
8. Carefully remove the multi-well tray from the soaking dish. Fill the dish with at least 2 cm water.
SECTION: Use webcam to collect images
9. In the Camera App toggle the time lapse to 5 seconds.
  

SECTION: Use webcam to collect images
9.1. Time lapse may need to be turned on in the settings of the Camera App.
  

SECTION: Use webcam to collect images
10. Set up a timer for ten minutes and begin the time lapse. Transfer the multi-well tray with the dry aggregates to the pan filled with water. Quickly and carefully submerge the aggregates. Place them in the same location as the in the reference photo.  

SECTION: Use webcam to collect images
11. Let the time lapse run at a 5 second interval for the first minute of recording, then toggle the time lapse to the 10 second interval without pausing or stopping the time lapse.
 

SECTION: Use webcam to collect images
12. Within the file directory where project data will be saved create a folder representing the sample that was tested. E.g. C:\Users\REM\Documents\SLAKES\SampleNameTime1_Depth1
SECTION: Use webcam to collect images
12.1. Within the Samples folder create a folder for the images collected from the sample. E.g. C:\Users\REM\Documents\SLAKES\SampleNameTime1_Depth1\Images
SECTION: Use webcam to collect images
12.2. Move the captured images to the Images folder created in step 12.1   . The default save location for the Camera app is the Camera Roll subfolder in the active user's Pictures folder. E.g. C:\Users\REM\Pictures\Camera Roll

SECTION: Use webcam to collect images
12.3. Ensure the Camera Roll folder    is empty before starting a different sample.

SECTION: Process The images in ImageJ
13. With ImageJ open, import the collected images. This can be done by dragging and dropping the images from the image folder created in step 12.1.   The images can also be imported through ImageJ by selecting 'File' from the menu followed by 'import' and then 'Image sequence'.  

SECTION: Process The images in ImageJ
13.1. If importing through the Drag and Drop method the images will need to be converted to a stack. From the menu select 'Image', 'Stacks', and 'Images to Stack'.   

SECTION: Process The images in ImageJ
14. Navigate the image stack with the left and right arrow keys. Make sure the images are in order. Delete any images with hands or other interference in them. Through the menu select 'Image', 'Stacks' and 'Delete Slice'.   

SECTION: Process The images in ImageJ
15. Set the Scale of the Image with the Straight Line Tool in ImageJ.
SECTION: Process The images in ImageJ
15.1. Drag the Straight Line Tool across a well plate.  

SECTION: Process The images in ImageJ
15.2. In the ImageJ menu go to 'Analyze' and 'Set Scale'. Enter the measured length of the single well in the Known distance section, Change the Unit of length to mm.  

SECTION: Process The images in ImageJ
17. Change the image stack to the 8-bit format by selecting 'Image', 'Type', and '8-bit'.   

SECTION: Process The images in ImageJ
16. Crop the image stack down to the area with just the well plate in it by selecting using the square selection tool and from the menu selecting 'Image' and 'Crop'.   

SECTION: Process The images in ImageJ
18. In the Menu select 'Analyze', 'Tools' and 'ROI Manager' to open the Region of Interest (ROI) Manager tool.  

SECTION: Process The images in ImageJ
18.1. Use the oval or rectangle tool to select the first well.
SECTION: Process The images in ImageJ
18.2. In the ROI Manager click Add or use the T as a shortcut to add the selection to the ROI manager tool.
SECTION: Process The images in ImageJ
18.3. Check the Show All checkbox to confirm numbers and locations as you add each individual well.  

SECTION: Process The images in ImageJ
19.1.  In the Menu select 'Process', 'Binary', and 'Make Binary'.  

SECTION: Process The images in ImageJ
19.3. Uncheck the "Black background" box.
SECTION: Process The images in ImageJ
19. Make the image stack a set of Binary images.
SECTION: Process The images in ImageJ
19.2. Images in the stack should generate a red layer over the soil aggregates. If any shadows are picked up during this stage they will also appear in red. If this happens cancel the Make Binary action and adjust the Contrast through the Menu by selecting Image then Adjust and Brightness/Contrast until shadows no longer appear in the selected ROIs.  

20. In the Menu select 'Analyze' then 'Set Measurements'. This will open the Set Measurements menu, which dictates what the ROI manager will analyze.   

20.1. In the Set Measurements menu select Area, Stack position, and Limit to Threshold. The Redirect to dropdown should be set to None and the Decimal places box should be set to 3.  

21. From the ROI manager window select 'More' and 'Multi Measure' to open the Multi Measure menu.   

21.1. In the Multi Measure menu check the boxes for 'Measure all # Slices' and One row per slice.
22. Save the Multi Measure results in the sample folder created in step 12  . The filename should match the format being used with '_Results' appended at the end.
E.g. SampleNameTime1_Depth1_Results.csv
SECTION: Computations
23. Several versions of slaking index calculations have been suggested. The slaking index originally recommended by Fajardo et al. (2016) involved fitting a rise-to-threshold (Goempertz function) model to timeseries of aggregate area, and computing the function's limit as the slaking index (SI). 

Flynn et al. (2020) recommended instead computing the observed change in aggregate area over time:
 
where A0 is the initial projected area of the dry aggregate and A600 is the projected
area after 600 seconds of slaking. Note that higher SI600 value indicates lower aggregate stability, as a less stable ped will spread out more over time. 

By contrast, Rieke et al. (2022) reported the inverse of SI600, such that higher values indicate greater aggregate stability. This follows the convention of other aggregate stability measures, with larger values indicating greater stability.







SECTION: Sample preparation
1. Start with air-dried soil that was not previously sieved. It is recommended to measure at least 9 to 12 pea-sized (3 to 10 mm) aggregates per soil sample. See Phillips et al. (submitted 2023) for more information on necessary replication. 

If the soil sample is consolidated and does not have enough pea-sized aggregates, it can be sieved through a 8 mm mesh sieve to break it up.
SECTION: Computations
24. This R script provides example code for plotting area timeseries and computing slaking index following Flynn et al. (2020).   

SECTION: Computations
25. Slaking index tends to follow a log-normal distribution with a long right tail. Because arithmetic means are influenced by high outliers, it is recommended to use a geometric mean (and geometric standard deviation) to summarize the aggregates for each soil sample.

The geometric mean is equivalent to computing the arithmetic mean of log-transformed
data, and back-transforming the mean: 
 
Similarly, the geometric standard deviation is equal to computing the arithmetic standard deviation of log-transformed data, and back-transforming the standard deviation.