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
When applying a transformation to an image element or a labels element, or when rasterizing an image or labels, dask_image.ndinterp.affine_transform() is called (you can search this function to find the two occurrences in the code).
At the moment we use the following or equivalent code:
if schema == Labels2DModel or schema == Labels3DModel:
kwargs = {"prefilter": False, "order": 0}
elif schema == Image2DModel or schema == Image3DModel:
kwargs = {}
else:
raise ValueError(f"Unsupported schema {schema}")
to ensure that no interpolation is performed for labels, the result can be seen for instance here #165.
For images interpolation happens, an example of this is in the screenshot example. We may want to do one of the following:
expose kwargs to the user both for rasterize() and for BaseTransformation.transform()
don't do anything
use the same approach as for labels -> no interpolation, no antialiasing
...
When this is done we should update the test test_rasterize_raster(), which at the moment can't perform a pixel to pixel comparison (also because of this other issue #165).
Notices that the rasterization function could be used for allowing an easy implementation of aggergation when images and labels are not aligned (e.g. rotated) or not the same resolution. For this one we will probably need to carefully choose the appropriate kwargs, and maybe even do some kind of normalization (the user will not have to worry about this, we can do it inside our aggregation functions that call the rasterization internally).
When applying a transformation to an image element or a labels element, or when rasterizing an image or labels,
dask_image.ndinterp.affine_transform()
is called (you can search this function to find the two occurrences in the code).At the moment we use the following or equivalent code:
to ensure that no interpolation is performed for labels, the result can be seen for instance here #165.
For images interpolation happens, an example of this is in the screenshot example. We may want to do one of the following:
kwargs
to the user both forrasterize()
and forBaseTransformation.transform()
When this is done we should update the test
test_rasterize_raster()
, which at the moment can't perform a pixel to pixel comparison (also because of this other issue #165).Screenshot example.
This
becomes this (the offset is due to #165)
when doing a rasterization with the parameter
target_unit_to_pixels = 2
The text was updated successfully, but these errors were encountered: