Follow the end to end walkthrough below to learn how to set up a custom Label Editor configuration based on DICOM tags. This End-to-end example assumes you configure the Label Editor so that two files are displayed at a given time.
This end-to-end example assumes that your files are stored in cloud storage.
Before registering your cloud data to Encord you must first create a JSON file specifying the files you want to register. The following JSON file registers 3 DICOM series consisting of 4 files each.
You can register your DICOM data using the JSON file you created, using the UI or the SDK.
Register data in the UI
To ensure smoother uploads and faster completion times, and avoid hitting absolute file limits, we recommend adding smaller batches of data. Limit uploads to 100 videos or up to 1,000 images at a time. You can also create multiple Datasets, all of which can be linked to a single Project. Familiarize yourself with our limits and best practices for data import/registration before adding data to Encord.
Navigate to Files section of Index in the Encord platform.
Click into a Folder.
Click + Upload files.
A dialog appears.
Click Import from cloud data.
We recommend turning on the Ignore individual file errors feature. This ensures that individual file errors do not lead to the whole upload process being aborted.
Click Add JSON or CSV files to add a JSON or CSV file specifying cloud data that is to be added.
Register data using in the SDK
To use your data in Encord, it must be uploaded to the Encord Files storage. Once uploaded, your data can be reused across multiple Projects and contain no labels or annotations themselves. Files stores your data, while Projects store your labels. The following script creates a folder in Files and uses your AWS integration to register data in that folder.
The following script creates a new folder in Files and initiates uploads from AWS. It works for all file types.
If Upload is still in progress, try again later! is returned, use the
script to check the upload status to see whether the upload has finished.
Ensure that you:
Replace <private_key_path> with the path to your private key.
Replace <integration_title> with the title of the integration you want to use.
Replace <folder_name> with the folder name. The scripts assume that the specified folder name is unique.
Replace A folder to store my files with a meaningful description for your folder.
Replace "my": "folder_metadata" with any metadata you want to add to the folder.
The script has several possible outputs:
“Upload is still in progress, try again later!”: The registration has not finished. Run this script again later to check if the data registration has finished.
“Upload completed”: The registration completed. If any files failed to upload, the URLs are listed.
“Upload failed”: The entire registration failed, and not just individual files. Ensure your JSON file is formatted correctly.
Copy
# Import dependenciesfrom encord import EncordUserClientfrom encord.orm.dataset import LongPollingStatus # Ensure correct import path# Instantiate user client. Replace <private_key_path> with the path to your private keyuser_client = EncordUserClient.create_with_ssh_private_key( ssh_private_key_path="<private_key_path>")# Specify the integration you want to useintegrations = user_client.get_cloud_integrations()integration_idx = [i.title for i in integrations].index("<integration_title>")integration = integrations[integration_idx].id# Create a storage folderfolder_name = "<folder_name>"folder_description = "A folder to store my files"folder_metadata = {"my": "folder_metadata"}storage_folder = user_client.create_storage_folder( folder_name, folder_description, client_metadata=folder_metadata)# Initiate cloud data registrationupload_job_id = storage_folder.add_private_data_to_folder_start( integration_id=integration, private_files="path/to/json/file.json", ignore_errors=True)# Check upload statusres = storage_folder.add_private_data_to_folder_get_result(upload_job_id, timeout_seconds=5)print(f"Execution result: {res}")if res.status == LongPollingStatus.PENDING: print("Upload is still in progress, try again later!")elif res.status == LongPollingStatus.DONE: print("Upload completed") if res.unit_errors: print("The following URLs failed to upload:") for e in res.unit_errors: print(e.object_urls)else: print(f"Upload failed: {res.errors}")