This is a task from the following repository
Located in this repository in the src directory
Link to pydicom documentation - https://pydicom.github.io/pydicom/stable
Perform input transformations using the pydicom module. You need to do the following:
-
delete information stored in the key
PatientName(anonymize files) -
using the information in the
StudyInstanceUID,SeriesInstanceUID,SOPInstanceUIDkeys, convert the file storage structure to the following:- at the first level
StudyInstanceUID - at the second level
SeriesInstanceUID - the file name will be the value of
SOPInstanceUIDwith the extension.dcm
Thus, the path to each file will look like this:
$StudyInstanceUID/$SeriesInstanceUID/$SOPInstanceUID.dcm - at the first level
-
Additionally, you need to create a file in which the path to each file in the source structure is mapped to the path to the file in the target structure.
The result of the work that you need to send an archive containing inside itself:
- directory with the resulting structure;
- a file with a list of matching paths;
- script code.
Send the result to vitaliy.nekrasov@3opinion.ai with the subject line: Name - Machine Learning Data Engineer