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
Given these arguments, there's no attribute that we can directly infer. This is not about things like pixel sizes, but really about any attribute.
Things change if we make a further assumption, namely that we have access to the image being labeled (either by assuming we can go up two levels in the Zarr hierarchy and find it, or by having an additional function argument).
In that case, we could get access to the image attributes; if we then also had additional information (mainly the target pyramid level), we could re-build the full attributes of the label image, as is currently done e.g. in the cellpose task (or equivalently in the napari-workflows task):
If we take this latter option, then the prepare_label_group function scope becomes broader, as it will handle both its current feature (mostly overwrite-related checks) and the feature of preparing Zarr attributes for the new group. We could then decide whether this is internally split in two functions, or a single one takes care of all of it (a renaming of the function could then be appropriate).
This is the current function signature:
Given these arguments, there's no attribute that we can directly infer. This is not about things like pixel sizes, but really about any attribute.
Things change if we make a further assumption, namely that we have access to the image being labeled (either by assuming we can go up two levels in the Zarr hierarchy and find it, or by having an additional function argument).
In that case, we could get access to the image attributes; if we then also had additional information (mainly the target pyramid level), we could re-build the full attributes of the label image, as is currently done e.g. in the cellpose task (or equivalently in the napari-workflows task):
This option for sure looks interesting, in view of factoring out a functionality which is already repeated in two tasks (note however that this is not how things happen e.g. in https://github.com/fmi-basel/gliberal-scMultipleX/blob/nar-fractal/src/scmultiplex/fractal/relabel_by_linking_consensus.py#L157-L174).
If we take this latter option, then the
prepare_label_group
function scope becomes broader, as it will handle both its current feature (mostly overwrite-related checks) and the feature of preparing Zarr attributes for the new group. We could then decide whether this is internally split in two functions, or a single one takes care of all of it (a renaming of the function could then be appropriate).Originally posted by @tcompa in #619 (comment)
The text was updated successfully, but these errors were encountered: