Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: files _nrrd and _dcm are ignored #3

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading