-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting single cell information from segmented masks #49
Comments
I think you would want to use the SegRefined image, where the cell boundaries are green and the interiors are red (positive) and blue (negative). As opposed to the Seg image, this is after postprocessing has been performed, so you would not need to do any thresholding yourself. Since borders might be touching, the easiest thing would probably be to mask out the red and blue regions, and then extract the contours for each of them. You could extend the boundaries by a pixel or two if the contour from this is too much away from the cell boundary. I would recommend using the generated tiff file directly, instead of reading in the entire pickle file which contains all of the images. (In fact, the pickle file seems superfluous, and I will probably remove it when I revisit this function.) In a coincidence of timing, though, we are currently revising the postprocessing to generate individual cell outputs (including the boundary coordinates of each cell). This will be integrated in the coming weeks, and might be useful for you. We are doing this primarily for our own internal use, and the data is heavily encoded to reduce space, but there will be a decode function so it should be generally usable. I will update here when that part is ready. |
Thanks a lot Joseph. Will mull this and think about implementing. Looking forward to the updates re individual cell outputs – sounds very useful
Paul
From: Joseph Marino ***@***.***>
Date: Thursday, 6 February 2025 at 18:26
To: nadeemlab/DeepLIIF ***@***.***>
Cc: Paul Buckley ***@***.***>, Author ***@***.***>
Subject: Re: [nadeemlab/DeepLIIF] Extracting single cell information from segmented masks (Issue #49)
I think you would want to use the SegRefined image, where the cell boundaries are green and the interiors are red (positive) and blue (negative). As opposed to the Seg image, this is after postprocessing has been performed, so you would not need to do any thresholding yourself. Since borders might be touching, the easiest thing would probably be to mask out the red and blue regions, and then extract the contours for each of them. You could extend the boundaries by a pixel or two if the contour from this is too much away from the cell boundary. I would recommend using the generated tiff file directly, instead of reading in the entire pickle file which contains all of the images. (In fact, the pickle file seems superfluous, and I will probably remove it when I revisit this function.)
In a coincidence of timing, though, we are currently revising the postprocessing to generate individual cell outputs (including the boundary coordinates of each cell). This will be integrated in the coming weeks, and might be useful for you. We are doing this primarily for our own internal use, and the data is heavily encoded to reduce space, but there will be a decode function so it should be generally usable. I will update here when that part is ready.
—
Reply to this email directly, view it on GitHub<#49 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A4CGWGEOXKOIC6E367T644L2OOSNLAVCNFSM6AAAAABWT7P7G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBQGY4DCNJTGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi
As per previous discussion i am wondering whether you could provide some guidance in how to extract single cell information (ie pve nve cell coordinates, shape etc) from the segmented mask. I’m assuming the pickle file is the best way to do it? wondering if you wouldn’t mind recommending a way of doing this .. currently I was looking at RBG based thresholding but wanted to ensure that was the most appropriate way.
thanks
The text was updated successfully, but these errors were encountered: