Skip to content

Commit

Permalink
Merge pull request #3 from IvanKuchin/development
Browse files Browse the repository at this point in the history
Bugfix: files _nrrd and _dcm are ignored
  • Loading branch information
IvanKuchin committed Jul 8, 2024
2 parents 20c7669 + f009de5 commit 8fd5142
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dataset/pomc_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def read_nrrd_data_from_files(files):

def get_dicom_data(self, folder):
result = np.array([])
file_list = glob.glob(os.path.join(folder, "*.dcm"))
# *dcm instead of *.dcm let us to read files like this
# 1-1_dcm and 1-2.dcm
file_list = glob.glob(os.path.join(folder, "*dcm"))
if len(file_list):
result, metadata = self.read_dicom_data_from_files(file_list)
if result.shape[0]:
Expand All @@ -100,7 +102,7 @@ def get_dicom_data(self, folder):

def get_nrrd_data(self, folder):
result = np.array([])
file_list = glob.glob(os.path.join(folder, "*.nrrd"))
file_list = glob.glob(os.path.join(folder, "*nrrd"))
if len(file_list):
result, metadata = self.read_nrrd_data_from_files(file_list)
if result.shape[0]:
Expand Down

0 comments on commit 8fd5142

Please sign in to comment.