.
This commit is contained in:
@@ -2,6 +2,7 @@ import re
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
import pydicom
|
||||
import pydicom.errors
|
||||
|
||||
import six
|
||||
import os
|
||||
@@ -26,7 +27,10 @@ class Command(BaseCommand):
|
||||
files = get_all_media()
|
||||
|
||||
for file in files:
|
||||
ds = pydicom.dcmread(file, force=False)
|
||||
try:
|
||||
ds = pydicom.dcmread(file, force=False)
|
||||
except pydicom.errors.InvalidDicomError:
|
||||
continue
|
||||
|
||||
site_codes = ("ref", "rk9", "ra9", "rh8", "rbz", "rba")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user