You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that as of #5037regionprops can measure intensity properties for multichannel images.
The resulting intensity properties are named with an appended -0 ,.... -n for a n+1 channel
image, e.g. mean_intensity-0, mean_intensity-1.
In practical applications the channel may have meaningful names, e.g. DAPI or GFP for fluorescence microscopy images.
My proposal is to add an optional argument channel_names to regionprops and regionprops_table.
If channel_names is None the behaviour should be unchanged, i.e. add an integer channel number.
If channel names is a Tuple or List of [str] of the same length as the number of channels, e.g. ("DAPI", "GFP") the appendices to the property name should be taken from that list, that is mean_intensity-DAPI, mean_intensity-GFP in the given example.
This would potentially have side effects for #5213
The text was updated successfully, but these errors were encountered:
Oops ... after following the link to #5037 I realize that this isn't that trivia as I thoughtl because the numbering comes from the way that vector-valued features in regionprops are unrolled into regionprops_table.
looking into this a bit more, the new optional channel_names in regionprops and regionprops_table could be passed to _props_to_dict which would be the function in which the new functionality is added. A channel_names are then the default None would also flag that these are multidimensional intensity measurements.
Description
I noticed that as of #5037
regionprops
can measure intensity properties for multichannel images.The resulting intensity properties are named with an appended
-0
,....-n
for an+1
channelimage, e.g.
mean_intensity-0
,mean_intensity-1
.In practical applications the channel may have meaningful names, e.g.
DAPI
orGFP
for fluorescence microscopy images.My proposal is to add an optional argument
channel_names
toregionprops
andregionprops_table
.If
channel_names
isNone
the behaviour should be unchanged, i.e. add an integer channel number.If channel names is a Tuple or List of
[str]
of the same length as the number of channels, e.g.("DAPI", "GFP")
the appendices to the property name should be taken from that list, that ismean_intensity-DAPI
,mean_intensity-GFP
in the given example.This would potentially have side effects for #5213
The text was updated successfully, but these errors were encountered: