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
PR #71 adds to_mask for some of the single regions, but in future we'll need to implement it on Compound regions. This will have varying degrees of difficulty depending on the mode:
mode='center' - should be easy to implement using boolean operations
mode='subpixel' and mode='exact' - this is more complex because if you get two mask pixels that have values of 0.5 for example, it's not clear whether that 0.5 fraction is the same for the two regions in a compound region. If the compound region is a union, the final result could be anywhere from 0.5 to 1.0. There are different possible solutions here. One of them would be to simply convert the compound region to a polygon region (which would need to support multiple disjointed polygons) and then use to_mask on the polygon region class.
This issue is meant to be a space for brainstorming about this, so just add a comment if you have other ideas on how to do this properly.
The text was updated successfully, but these errors were encountered:
PR #71 adds to_mask for some of the single regions, but in future we'll need to implement it on Compound regions. This will have varying degrees of difficulty depending on the mode:
mode='center'
- should be easy to implement using boolean operationsmode='subpixel'
andmode='exact'
- this is more complex because if you get two mask pixels that have values of 0.5 for example, it's not clear whether that 0.5 fraction is the same for the two regions in a compound region. If the compound region is a union, the final result could be anywhere from 0.5 to 1.0. There are different possible solutions here. One of them would be to simply convert the compound region to a polygon region (which would need to support multiple disjointed polygons) and then use to_mask on the polygon region class.This issue is meant to be a space for brainstorming about this, so just add a comment if you have other ideas on how to do this properly.
The text was updated successfully, but these errors were encountered: