DOI: 10.5061/dryad.79cnp5j4c
title: Novel image-analytic approach reveals new insights in fine tuning of slime mould network adaptation

description: This study introduces a novel methodology to explore the network dynamics
 of Physarum polycephalum, an organism celebrated for its remarkable
 adaptive capabilities. We used two innovative techniques to analyse its
 growth behaviour and network modifications under stress conditions,
 including starvation and differential epinephrine exposures. The first
 method provided a quantitative assessment of growth and exploration over
 time. The second method provided a detailed examination of vein diameter
 and contraction patterns, illuminating the physiological adjustments P.
 polycephalum undergoes in response to environmental challenges. By
 integrating these approaches, we were able to estimate the total network
 volume of the organism, with a focus on the normalised estimated volume,
 unveiling insightful aspects of its structural adaptations. While
 starvation reduced the volume, indicating a significant structural
 compromise, low and high epinephrine concentrations maintained a
 volume-to-area ratio comparable to the control. Determining the fractal
 dimension of the networks over time revealed a fine-tuning of the network
 complexity in response to environmental conditions, with significant
 reductions under stress indicating a constrained network adaptation
 strategy. These methods, novel in their application to P. polycephalum,
 provide a framework for future studies and a basis for exploring complex
 network behaviours with potential applications in bioengineering and
 adaptive network design.
description: # Novel image-analytic approach reveals new insights in fine tuning of
 slime mould network adaptation
 [https://doi.org/10.5061/dryad.79cnp5j4c](https://doi.org/10.5061/dryad.79cnp5j4c) ## Description of the data and file structure ### data.zip Within the **data.zip** folder there are the sample folders and 2 separated files. Each folder is named to reflect the condition and duplicate number. The naming convention is as follows: * 00-000-0x = control condition * 07-000-0x = starvation condition * 08-080-0x = high concentration of epinephrine (68.23 µM) * 08-175-0x = low concentration of epinephrine (34.14 µM) The "x" in each folder name refers to the replicate number. Control and epinephrine conditions include replicates 1 to 8, while starvation includes replicates 1 to 3. Each sample folder contains two subfolders: Contraction and Growth. #### **Contraction Folder** This folder contains the following files: * **MeanDia-Freq_AllSections.csv**: This file includes contraction frequency and vein diameter data for all sections in the recording. Columns are separated by a semicolon ";" and contain: 1. Section ID Number 2. Average vein diameter (µm) 3. Maximum vein diameter (µm) 4. Minimum vein diameter (µm) 5. Estimated contraction frequency (Hz) * **Overview.tif**: A representative image of the recording showing the detected sections, labelled with their Section ID Numbers corresponding to the CSV files. * **SectionsDetailed.csv**: This file contains detailed time-series data for each section. For every section, five rows are included: 1. Section ID 2. Measurement results (µm) 3. Denoised measurement results (µm) 4. Time points of recording (seconds) 5. Estimated contraction frequency (Hz) #### **Growth Folder** This folder contains the following files: * **FractalDimension.csv**: This file contains columns for the time (in minutes) and the fractal dimension calculated using the box-counting method. It also includes additional statistical parameters such as slope, R², intercept, and standard error. * **growthResults.csv**: This file includes columns for time (minutes), calculated area (mm²), and growth rate. Additionally, in folder 00-000-01, you will find all images used for the analysis. Due to storage limitations, images for other samples are available upon request. Each image is labelled with the recording date and time, followed by "_processed" to indicate that the image has been denoised. #### Conditions.csv This file contains descriptions of the sample names and experimental conditions used in the study. #### Statistics.csv This file is divided into three parts: 1. **Sample Data**: Contains data for each sample, including sampleID, explored area (%), exploration rate (%/hr), estimated volume (mm³), normalised volume, growth rate, average vein diameter (µm), average contraction frequency (Hz), average contraction frequency per minute (Hz/min). 2. **Saphiro-Wilk Test**: Shows the results of the normality test for each metric, with columns for sample ID, metric type, test statistic, p-value, and interpretation. 3. **Student's t-Test Results**: Presents the results of statistical comparisons between control and other conditions, including test statistic, p-value, and significance level. ### code.zip This folder contains all Python scripts and utilities used in the study for image capture, processing, and analysis. The folder is organised into three main subfolders: CameraCapture, ImageProcessing, and ImageAnalysis. Each subfolder is structured to handle specific tasks, ranging from capturing images using a Raspberry Pi camera setup to analysing vein measurements and calculating fractal dimensions. #### 1. CameraCapture The **CameraCapture** folder includes all the necessary files for capturing images using the Raspberry Pi setup. It consists of two subfolders: GeneralStuff and TIS-Capture. ##### **GeneralStuff:** * **tiscamera/**: This folder contains files from the repository provided by The Imaging Source company, downloaded from [here](https://github.com/TheImagingSource/tiscamera). It provides essential camera handling libraries and functionality. * **BasicStuff.py, FileAndFolderStuff.py, TimeStuff.py**: These scripts contain essential functions and utilities required by the main scripts for file handling, folder management, and time-related operations. ##### **TIS-Capture:** * **ImageRecording/**: This subfolder contains Python files responsible for the core image capturing process. * **ArduinoLedCapture.py**: Controls the synchronization between the camera and Arduino-driven LEDs. * **cameraCapture.py**: Manages the image capturing process from the camera. * **captureClasses.py**: Contains object-oriented classes for image capturing operations. * **generalFunctions.py**: Provides general utility functions used across the capture process. * **recodingFunctions.py**: Defines functions that handle image recording and saving. * **TIS.py**: A file sourced from [The Imaging Source repository](https://github.com/TheImagingSource/tiscamera) for camera interaction. * **CameraCaptureGUI.py**: Launches the graphical user interface (GUI) to set parameters for capturing images, such as time intervals and output locations. * **ShowPreview.py**: Opens a preview window displaying the live field of view from the camera, allowing the user to position samples correctly before starting image capture. #### 2. ImageProcessing The ImageProcessing folder contains the Python script needed for denoising the captured images. * **ImageProcessing.py**: This script includes all the necessary functions to preprocess and denoise the images captured by the camera setting. It reduces noise to improve the clarity and accuracy of subsequent analysis steps. #### **3. ImageAnalysis** The ImageAnalysis folder contains all scripts needed for growth analysis, fractal dimension calculation, volume estimation, and vein section measurements. The key files in this folder include: * **Main.py**: The core script to initiate the overall analysis process. * **MainGUI.py**: Launches a graphical user interface to select the folder containing images and initiate network analysis or growth analysis automatically. * **CircleMask.py**: Contains functions necessary for automatically detecting the Petri dish during the growth and movement analysis, ensuring accurate tracking of the organism's position within the dish. * **ExportCSV.py**: Handles the export of analysed data into CSV format. * **FractalDimension.py**: Contains the functions required for calculating the fractal dimension using the box-counting method. * **Growth_MoveAlgorithm.py**: Implements the algorithm for measuring growth and movement of the slime mould. * **ImageProcessingPreviewMask_reshape.py** and **ImageProcessingPreviewSlider.py**: Utility scripts to preview image processing and adjust masks/sliders for better image analysis. * **NetworkMeasure_Class.py**: Defines the object-oriented classes used to measure network structures within the images. * **SampleSegmentCheck.py**: Provides functions to check the time frequency of image recording, ensuring that the intervals between recorded images are consistent and accurate throughout the experiment. * **VeinMeasure_Functions.py**: Contains functions specific to measuring vein diameter and calculating contraction frequencies. * **VolumeCalculation.py**: Handles the calculation of the estimated network volume, including possible error estimations based on different cross-sectional shapes. * **WelchsMethodFrequency.py**: Implements Welch's method to analyse the contraction frequency of the slime mould's network. #### Running the Scripts: * **MainGUI.py**: Users can run this script to open a GUI for selecting image directories and executing network analysis or growth analysis automatically. * **Main.py**: This script is used for volume calculation and fractal dimension analysis and will execute the corresponding functions based on the selected directory. ## Code/Software Python Version: 3.10.11 Used Libriaries:  * OpenCV - 4.5.5 * Numpy - 1.24.4 * SciPy - 1.8.0 * Matplotlib - 3.5.1 * statsmodels - 0.13.5