-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mask/Labeling Conversion Methods #45
base: master
Are you sure you want to change the base?
Conversation
Rebased over latest master to fix conflicts. |
@awalter17 Do you need this for KNIME? I vaguely recall you mentioning work along these lines for KNIME back in September. Should we prioritize merging this? |
@ctrueden If I am not mistaken, @awalter17 had invested some more time after discussions we had about KNIME's OMERO integration. @gab1one's implementation to read ROIs from OMERO is a little suboptimal and should be handled upstream.. |
@ctrueden thanks for fixing the conflicts! It would be nice to get this merged, because I am starting forget what I did and why. However, I don't think this merge is currently blocking anyone. So I would say this merge is "nice to have", but not immediately critical. As @stelfrich mentioned, this PR came out of discussions about KNIME's OMERO integration. As I recall, KNIME currently uses |
Hello!
The goal of this PR is to add mechanisms for going between Labelings and
MaskPredicate
s.Changes this branch makes:
LabeledMaskInterval
class, which wraps aMaskInterval
and adds a labelMaskInterval
List< MaskInterval >
toImgLabeling
Notes:
LabeledMaskInterval
because there's no unbounded or real-space labelingsMaskInterval
methods just wrapLabelRegion
s asMaskInterval
s then asLabeledMaskInterval
sMaskInterval
toImgLabeling
rastersMaskInterval
to the providedImgLabeling
, which means the conversion is not fully reversible (i.e. you can go back to aMaskInterval
but information has been lossed)MaskInterval
toImgLabeling
methods will recurse throughCompositeMaskPredicate
s, so if the rootMaskInterval
isn't aLabeledMaskInterval
but the children are those labels will be added to theImgLabeling
. However, the labels will only be added at locations contained in the rootMaskInterval
MaskInterval
s which are notLabeledMaskInterval
s even if they're part of aCompositeMaskInterval
. Meaning you could have aMaskInterval
which is an "or" of one labeled and unlabeled mask, and only the labeled mask will appear in theImgLabeling
.Please let me know if you have any questions, or if any changes are necessary!