Mask/Labeling Conversion Methods#45
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
MaskPredicates.Changes this branch makes:
LabeledMaskIntervalclass, which wraps aMaskIntervaland adds a labelMaskIntervalList< MaskInterval >toImgLabelingNotes:
LabeledMaskIntervalbecause there's no unbounded or real-space labelingsMaskIntervalmethods just wrapLabelRegions asMaskIntervals then asLabeledMaskIntervalsMaskIntervaltoImgLabelingrastersMaskIntervalto the providedImgLabeling, which means the conversion is not fully reversible (i.e. you can go back to aMaskIntervalbut information has been lossed)MaskIntervaltoImgLabelingmethods will recurse throughCompositeMaskPredicates, so if the rootMaskIntervalisn't aLabeledMaskIntervalbut the children are those labels will be added to theImgLabeling. However, the labels will only be added at locations contained in the rootMaskIntervalMaskIntervals which are notLabeledMaskIntervals even if they're part of aCompositeMaskInterval. Meaning you could have aMaskIntervalwhich 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!