Correlation between two channels - Image analysis

Hi Lukas,

Sorry I know this is confusing… hopefully this would be clearer?

The goal is to calculate a Pearson Correlation only in the overlap between two probes, so I would need to obtain XY and intensity values from both channels and do a correlation analysis. However, an image contains many cells, and I would like to do the correlation analysis separately for each cell, instead of calculating one correlation coefficient using pixels from all cells on the image. So, while manipulating data/image, I need to keep track of labels.

My workflow is quite messy right now…not sure if there’s a way to share just the relevant section of the workflow…

Currently I have a table with images of channel 1 and channel 2, and a segmentation column with the ROIs. I used the Segment Cropper to crop channel 1 and 2 based on my labeling column. One problem is that Segment Cropper doesn’t always crop out single segments; sometimes the resulting cropped images contains two ROIs…maybe because the ROIs are close together?

After the Segment Cropper node, I have a table of cropped images (ideally of each ROIs) and the label column. The idea to use Splitter on X and Image to DataRow is really to get XY coordinates with intensity. I thought of using this because of this post: Extract pixel values from pictures
Problem I encountered here is that, when I split across X, I only get 4 slices, which means I only get 4 Y pixels along the X (dimension of 4 pixel on the Y axis). However, some ROIs are definitely bigger than that in terms of XY dimensions, so I wonder if it’s because some ROIs are really small, so the table only output the minimum number of columns to keep the table ‘even’. Otherwise, I should have gotten different number of slices for my different cropped images/ROIs (different sizes); the smaller ROIs would then having empty columns for the non-existent slices. If my table only contains one cropped segment, Splitter along X would give the right number of slices.

I haven’t learned how to use Loop, but I wondering if it could help with my situation here. If I could process each row/ROI separately, maybe I could get the right number of X slices for each ROI.

2 Likes