Skip to content

Commit

Permalink
Merge branch 'ImagingDataCommons:main' into feat-download-progress
Browse files Browse the repository at this point in the history
  • Loading branch information
vkt1414 authored May 1, 2024
2 parents c08aff5 + 1f8e2c6 commit 84b0806
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions idc_index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ def get_series_file_URLs(self, seriesInstanceUID):
# Query to get the S3 URL
s3url_query = f"""
SELECT
series_aws_url
series_aws_url
FROM
index
index
WHERE
SeriesInstanceUID='{seriesInstanceUID}'
SeriesInstanceUID='{seriesInstanceUID}'
"""
s3url_query_df = self.sql_query(s3url_query)
s3_url = s3url_query_df.series_aws_url[0]
Expand All @@ -353,7 +353,11 @@ def get_series_file_URLs(self, seriesInstanceUID):

# Parse the output to get the file names
lines = output.split("\n")
file_names = [s3_url + line.split()[-1] for line in lines if line]
file_names = [
s3_url + line.split()[-1]
for line in lines
if line and line.split()[-1].endswith(".dcm")
]

return file_names

Expand Down

0 comments on commit 84b0806

Please sign in to comment.