This repository contains scripts for image analysis using Groovy and Python. The scripts are designed to process and analyze confocal microscopy images, specifically focusing on cell segmentation and marker quantification.
Description: This script converts .lif
files to .tiff
format and prepares images for segmentation.
Usage:
-
Input Parameters:
inputFiles
: Directory containing the.lif
files.outputDir
: Directory to save the converted.tiff
files.greenModel
: Path to the green model file.redModel
: Path to the red model file.refIndex
: Reference channel index.targetIndex
: Target channel index.
-
Execution:
- Run the script in ImageJ/Fiji with the specified input parameters.
-
Output:
- The script generates
.tiff
files in the specified output directory.
- The script generates
Description: This script quantifies the presence of two markers within segmented cells in 3D images.
Usage:
-
Input Parameters:
inputFilesDir
: Directory containing the raw image files.outputDir
: Directory to save the results.dapiChannel
: Channel number for DAPI.marker1Channel
: Channel number for Marker1.microgliaChannel
: Channel number for Microglia.mdkChannel
: Channel number for MDK.lucChannel
: Channel number for LUC.applyDAPI
: Boolean to apply DAPI.
-
Execution:
- Run the script in ImageJ/Fiji with the specified input parameters.
-
Output:
- The script generates a CSV file with the quantification results and saves merged images in the specified output directory.
Description: This script quantifies the presence of three markers within segmented cells in 3D images.
Usage:
-
Input Parameters:
inputFilesDir
: Directory containing the raw image files.outputDir
: Directory to save the results.dapiChannel
: Channel number for DAPI.marker1Channel
: Channel number for Marker1.microgliaChannel
: Channel number for Microglia.mdkChannel
: Channel number for MDK.lucChannel
: Channel number for LUC.applyDAPI
: Boolean to apply DAPI.
-
Execution:
- Run the script in ImageJ/Fiji with the specified input parameters.
-
Output:
- The script generates a CSV file with the quantification results and saves merged images in the specified output directory.
The Python script uses the Cellpose library to run cell segmentation with specified parameters. It loads images, runs the Cellpose model, and saves the segmentation results.
Usage:
-
Input Parameters:
directory
: Directory containing the raw image files.pretrained_model
: Pretrained model to use (e.g.,cyto3
).stitch_threshold
: Threshold for stitching.flow_threshold
: Threshold for flow.cellprob_threshold
: Threshold for cell probability.chan
: Channel number to use.save_tif
: Boolean to save results as TIFF.use_gpu
: Boolean to use GPU.diameter
: Diameter of cells.
-
Execution:
- Run the script with the specified input parameters.
-
Output:
- The script saves the segmentation results in the specified directory.
- ImageJ/Fiji
- Required plugins:
- ChannelSplitter
- Duplicator
- RGBStackMerge
- ZProjector
- RoiManager
- BinaryImages
- CommonColors
- ColorImages
- Strel
- BF
- ImporterOptions
- Objects3DPopulation
- ImageInt
- Python 3.x
- Cellpose library
- Required libraries:
- models
- io
- Install ImageJ/Fiji.
- Install the required plugins.
- Install Python 3.x.
- Install the Cellpose library using pip:
pip install cellpose
This repository is licensed under the MIT License. See the LICENSE
file for more information.