Skip to content
Open
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
5 changes: 2 additions & 3 deletions tutorials/tutorial_1/containers/data-prep/dataprep_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ def convert_dcm_image_to_jpg(name):

def dataset_dcm_to_jpg(dataset_df):
input_dir = '/input/dicom_data/'
output_dir = '/output/file_data/'
output_dir = '/output/0/file_data/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is required - users can still write to /output/file_data if they have a single output dataset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error occurred while removing it:

Failed to import output datasets.Dataset 'Site 1 Dataset (v=3)': Failed to import output datasets. Error in prevalidation for the following fields:
JPG file: Field of type Filename requires file base path to be provided - please re-import and specify a file base path.

dcm_list = glob.glob(input_dir + '/*/*.dcm')

dataset_df['JPG_file'] = 'Nan'
for dcm_file in dcm_list:
image = convert_dcm_image_to_jpg(dcm_file)
jpg_file_name = dcm_file.split('/')[-1].split('.dcm')[0] + '.jpg'
Expand Down Expand Up @@ -52,5 +51,5 @@ def dataset_dcm_to_jpg(dataset_df):
dataset = dataset_dcm_to_jpg(dataset)

# Write dataset to /output
dataset.to_csv('/output/dataset.csv', index=False)
dataset.to_csv('/output/0/dataset.csv', index=False)