Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Qu committed Jun 6, 2022
1 parent 51634e6 commit f43b45e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion imgtools/io/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def load_from_nrrd(

for col in df_metadata.columns:
if col.startswith("folder"):
df_metadata[col] = df_metadata[col].apply(lambda x: pathlib.Path(os.path.split(os.path.dirname(path))[0], x).as_posix()) #input folder joined with the rel path
df_metadata[col] = df_metadata[col].apply(lambda x: pathlib.Path(os.path.split(os.path.dirname(path))[0], x).as_posix() if isinstance(x, str) else x) #input folder joined with the rel path

output_streams = [("_").join(cols.split("_")[1:]) for cols in df_metadata.columns if cols.split("_")[0] == "folder"]
imp_metadata = [cols for cols in df_metadata.columns if cols.split("_")[0] in ("metadata")]
Expand Down
1 change: 1 addition & 0 deletions imgtools/io/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def read_dicom_pet(path,series=None):
def read_dicom_auto(path, series=None):
if path is None:
return None
print(path)
dcms = glob.glob(pathlib.Path(path, "*.dcm").as_posix())
meta = dcmread(dcms[0])
modality = meta.Modality
Expand Down

0 comments on commit f43b45e

Please sign in to comment.