Skip to content

Commit b31d13e

Browse files
committed
revert changes no longer needed
1 parent 8212c7c commit b31d13e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

heudiconv/dicoms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def validate_dicom(
183183
except AttributeError as e:
184184
lgr.warning('Ignoring %s since not quite a "normal" DICOM: %s', fl, e)
185185
return None
186+
if dcmfilter is not None and dcmfilter(mw.dcm_data):
187+
lgr.warning("Ignoring %s because of DICOM filter", fl)
188+
return None
186189
if mw.dcm_data[0x0008, 0x0016].repval in (
187190
"Raw Data Storage",
188191
"GrayscaleSoftcopyPresentationStateStorage",
@@ -194,9 +197,6 @@ def validate_dicom(
194197
except AttributeError:
195198
lgr.info("File {} is missing any StudyInstanceUID".format(fl))
196199
file_studyUID = None
197-
if dcmfilter is not None and dcmfilter(mw.dcm_data):
198-
lgr.warning("Ignoring %s because of DICOM filter", fl)
199-
return None
200200
# clean series signature
201201
for sig in ("iop", "ICE_Dims", "SequenceName"):
202202
try:

heudiconv/heuristics/reproin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _delete_chars(from_str: str, deletechars: str) -> str:
226226

227227
def filter_dicom(dcmdata: dcm.dataset.Dataset) -> bool:
228228
"""Return True if a DICOM dataset should be filtered out, else False"""
229-
return True if dcmdata.get("StudyInstanceUID") in dicoms2skip else False
229+
return True if dcmdata.StudyInstanceUID in dicoms2skip else False
230230

231231

232232
def filter_files(_fn: str) -> bool:

0 commit comments

Comments
 (0)