Skip to content

Commit

Permalink
adding axial filter
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoch committed Dec 15, 2017
1 parent d1f7cc3 commit 25f3c9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sendit/apps/main/tasks/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def import_dicomdir(dicom_dir, run_get_identifiers=True):
continue_processing = True
if dcm.get('BurnedInAnnotation') is not None:
continue_processing = False

if "AXIAL" not in dcm.get('ImageType'):
continue_processing = False

if continue_processing is True:
# Create the Image object in the database
Expand Down
7 changes: 6 additions & 1 deletion sendit/apps/main/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import time
from sendit.logger import bot
import sys
import re
import os


Expand Down Expand Up @@ -122,7 +123,11 @@ def update_cached(subfolder=None):
for base in CHECK_FOLDERS:
print('Checking base %s' %base)
if os.path.exists(base) and os.path.isdir(base):
contenders = get_contenders(base=base,current=current)
# If it's not a date
if not re.search('[0-9]{10}$', base):
contenders = [base]
else:
contenders = get_contenders(base=base,current=current)
for contender in contenders:
dicom_dir = "%s/%s" %(base,contender)
dcm_folder = os.path.basename(dicom_dir)
Expand Down

0 comments on commit 25f3c9f

Please sign in to comment.