Commit d3ea409
committed
BUG: fix infer_contrast() when the tag was missing
This function worked (and validated by a test) when ContrastBolusAgent tag existed and had the value of "NONE".
However, if the tag never existed in the source it's value would be set to -12345 during sanitation. This would cause all series without the tag present to be infered as having contrast.
Add a check for the default value and a test to validate functionality. The test file is a copy of the existing test file with the ContrastBolusAgent tag removed and UIDs changed.1 parent 6ae7bc5 commit d3ea409
File tree
3 files changed
+10
-2
lines changed- src/dcm_classifier
- tests
- testing_data/anonymized_testing_data/contrast_data/without_contrast
- unit_testing
3 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
0 commit comments