retroam / Calcium-analysis

Python implementation of calcium imaging analysis pipeline for cardiac myocytes
0 stars 0 forks source link

Add Unit Tests for Image Segmentation and Data Extraction #10

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

This PR adds unit tests for the stack_to_roi function in calcium_analysis/image_segmentation.py and the roi_to_data function in calcium_analysis/data_extraction.py.

The tests for stack_to_roi check if the function correctly loads the image stack, computes the mean image, performs thresholding and morphological opening, identifies connected components, and saves the results.

The tests for roi_to_data check if the function correctly loads the labeled image and the image stack, extracts data from each region in each image, computes the mean intensity of each region and the background, and saves the results.

These tests will help ensure the correctness of the image segmentation and data extraction functionality of the Calcium Analysis pipeline.

Fixes #6.