BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
84 stars 35 forks source link

Numpy float or unsigned integer in TIFF images #131

Closed petesfew closed 8 months ago

petesfew commented 1 year ago

Hi,

I have been looking at the differences in the source code between the conversion of MCD files to a HistoCat compatible format and an analysis stack. I noticed that the numpy arrays (corresponding to TIFF images) generated by the export_to_histocat function is a float datatype. However, the TIFF images and numpy arrays from the analysis stack are unsigned integers. I was wondering if the differences in datatypes are defined explicit, and whether I can change the HistoCat TIFF images to unsigned integers as well. Thank you!

votti commented 1 year ago

Hi,

This is explicitly done so: Historically matlab Histocat would only support floating point tiffs, thus the floar export there. I don't know if this still is the case but would expect so

Fundamentally IMC data at the low intensity regime is count data, thus we thought in general int is well suited (and less memory heavy).

Cheers!

On Tue, May 2, 2023, 12:15 petesfew @.***> wrote:

Hi,

I have been looking at the differences in the source code between the conversion of MCD files to a HistoCat compatible format and an analysis stack. I noticed that the numpy arrays (corresponding to TIFF images) generated by the export_to_histocat function is a float datatype. However, the TIFF images and numpy arrays from the analysis stack are unsigned integers. I was wondering if the differences in datatypes are defined explicit, and whether I can change the HistoCat TIFF images to unsigned integers as well. Thank you!

— Reply to this email directly, view it on GitHub https://github.com/BodenmillerGroup/ImcSegmentationPipeline/issues/131, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4R2KFIGDSQTCJINOB5MU3XEDNDXANCNFSM6AAAAAAXS2WGXI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

petesfew commented 1 year ago

Hi @votti

I suspect there might be a small difference in the signals from the same channel between the HistoCat and analysis stacks. Does that mean we should prioritise the use of uint unless incompatible? Thank you!

Milad4849 commented 8 months ago

Closing this due to inactivity.