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
{{ message }}
Repository navigation
Cases not currently covered by the aggergation #216
subtask, handle the case in which the labels are multiscale
aggregate labels by labels
subtask, handle the case in which the labels are multiscale
aggregate shapes by labels
subtask, handle the case in which the labels are multiscale
aggregate labels by shapes
subtask, handle the case in which the labels are multiscale
aggregate images by shapes
subtask, handle the case in which the images are multiscale
Additional points to consider:
Allow aggregation of raster with different resolution or non-overlapping areas (affine transform). To do this the strategy is to call rasterize() on all the raster elements involved into a common resolution. Non-overlapping areas are padded with 0 (background) by default by rasterize().
I think also the case in which two raster objects contain translations is not covered (for instance having two images with the same resolution, but with different translations/rotations, so that the overlap is actually smaller). I would wait for the new coordinate systems refactoring to be ready before implementing this.
The 3D case needs to be handled. I would add the implementation (and a corresponding Github issue to track) in the future, but I would already add all the if-else branches in the code that lead to these cases, with NotImplementedError()
I would like to come back to this. Right now I have an object that contains an image as well as some shapes. I am trying to compute features such as the mean marker intensity per cell. To do so, I was thinking of using rasterize() and aggregate(), however, I am having issues in making this work.
For a start, I cannot even properly rasterize my shapes. This is what I would like to do:
I have several questions about this. First, is it possible to infer the min and max coordinate dynamically? Putting these in manually seems prone to introduce bugs, especially when transformations are present in the object. Furthermore, rasterize() returns the dimensions ('c', 'y', 'x'). To parse them into a Labels2DModel, the c coordinate should not be present here.
Activity
MeyerBender commentedon Aug 3, 2026
Hi @LucaMarconato,
I would like to come back to this. Right now I have an object that contains an image as well as some shapes. I am trying to compute features such as the mean marker intensity per cell. To do so, I was thinking of using
rasterize()andaggregate(), however, I am having issues in making this work.For a start, I cannot even properly rasterize my shapes. This is what I would like to do:
I have several questions about this. First, is it possible to infer the min and max coordinate dynamically? Putting these in manually seems prone to introduce bugs, especially when transformations are present in the object. Furthermore,
rasterize()returns the dimensions('c', 'y', 'x'). To parse them into aLabels2DModel, theccoordinate should not be present here.