Is your feature request related to a problem? Please describe.ConvertAnnotationsToMask transforms annotations in one way using the convert_annotations function. I want to convert annotations to a mask with some custom behavior for point annotations among other things (https://github.com/NKI-AI/ahcore/issues/6). There is no way of overwriting this conversion behavior.
Describe the solution you'd like
I would like to suggest three features:
Add a callable function parameter to ConvertAnnotationsToMask to make it more configurable (e.g. convert_fn=convert_annotations). The output of these values should be the same as the current convert_annotations function.
Add an ignore_name to skip annotations with a certain label.
Add buffer_point_radius to convert_annotations. This would transform Point annotations into Polygons with a certain radius (if given).
Describe alternatives you've considered
Creating another conversion class ConvertPointAnnotationsToMask with the desired behavior.
Additional context
An initial start to implement these features can be found on this branch.
Is your feature request related to a problem? Please describe.
ConvertAnnotationsToMask
transforms annotations in one way using theconvert_annotations
function. I want to convert annotations to a mask with some custom behavior for point annotations among other things (https://github.com/NKI-AI/ahcore/issues/6). There is no way of overwriting this conversion behavior. Describe the solution you'd like I would like to suggest three features:ConvertAnnotationsToMask
to make it more configurable (e.g.convert_fn=convert_annotations
). The output of these values should be the same as the currentconvert_annotations
function.ignore_name
to skip annotations with a certain label.buffer_point_radius
toconvert_annotations
. This would transform Point annotations into Polygons with a certain radius (if given).Describe alternatives you've considered Creating another conversion class
ConvertPointAnnotationsToMask
with the desired behavior. Additional context An initial start to implement these features can be found on this branch.