Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related issues: follow-up to #279 (#278)
Since #279 each filter line is evaluated on its own, but the line results are then ANDed and each line's leading operator is dropped. So a line starting with
||is ANDed with the lines before it, while recipe-filters.md saysmeans SAVE or GE. In the default recipe, the "Burned In Annotation" (CTP) label (
contains ImageType SAVE,+ contains Modality CT|MR,|| contains BurnedInAnnotation YES, ...) only flags an image that matches every line, so an image with BurnedInAnnotation YES is not flagged. Of the deid-data images,ultrasounds/ultrasound-multiframe.dcm(BurnedInAnnotation YES) is the one that changes: not flagged on master, flagged with this change.The fix puts each line's
+/||operator between the line results, so lines are evaluated left to right the same way as operators within a line:A + B || Cis(A and B) or C. A line without an operator is still ANDed, as before, and labels made only of+lines (like the Stanford ones) give the same result as before.Added
test_has_burned_pixels_single_lines_with_orwith a small recipe intests/resources; it fails on master. The other tests pass, apart from two that also fail on master on my Windows machine (temp file still open). CHANGELOG line and version bump to 0.4.14 are included; #308 bumps to the same version, so I'll rebase whichever goes second.Checklist
Open questions
recipe-filters.md describes a line without an operator as starting a second check ("First check ... Second check"), but such lines are ANDed. I left that alone, since changing it would change what current recipes flag.