{"id":13812724,"url":"https://github.com/pieper/dicomsort","last_synced_at":"2025-09-08T04:32:11.360Z","repository":{"id":7973985,"uuid":"9375389","full_name":"pieper/dicomsort","owner":"pieper","description":"A project to provide custom sorting and renaming of dicom files","archived":false,"fork":false,"pushed_at":"2025-05-06T03:11:53.000Z","size":150,"stargazers_count":78,"open_issues_count":8,"forks_count":23,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-06T04:23:51.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pieper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-11T16:50:44.000Z","updated_at":"2025-05-06T03:11:57.000Z","dependencies_parsed_at":"2023-02-18T05:45:46.926Z","dependency_job_id":"dee27a2f-e89e-4c25-9890-e57c4829c5e2","html_url":"https://github.com/pieper/dicomsort","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pieper/dicomsort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieper%2Fdicomsort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieper%2Fdicomsort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieper%2Fdicomsort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieper%2Fdicomsort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pieper","download_url":"https://codeload.github.com/pieper/dicomsort/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieper%2Fdicomsort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274134666,"owners_count":25228198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:00:54.874Z","updated_at":"2025-09-08T04:32:11.348Z","avatar_url":"https://github.com/pieper.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Python"],"readme":"dicomsort\n=========\n\nA project to provide custom sorting and renaming of dicom files\n\n\nDescription\n-----------\n\nGiven DICOM files in a random folder structure, this program copies all into a user-defined folder hierarchy, creating folders as necessary and changing DICOM file names to be more meaningful.\n\nThe user can define the target folder structure and file naming by using a string consisting of concatenated tag names (like 'PatientName'), underscores and slashes.\nThe last part of the string (as separated by slashes) denotes the naming convention for the file parts.\n\nAn Example: a target string of\n 'Modality/PatientName_PatientID'\nmeans that all DICOM images are arranged in a base folder and named by PatientName_PatientID,\nfollowed by an underscore and a unique number for every file that falls into the same category (and is not the same..?)\n\ndicomsort returns with a count for both DICOM files organized and non-DICOM (or invalid DICOM) files skipped.\nIt aborts with an error if it is to overwrite any existing file.\n\n\nInstallation\n------------\n\n```bash\npip install thedicomsort\n```\n\n\n```bash\n% dicomsort --help\ndicomsort [options...] sourceDir targetDir/\u003cpatterns\u003e\n\n where [options...] can be:\n    [-z,--compressTargets] - create a .zip file in the target directory\n    [-d,--deleteSource] - remove source files/directories after sorting\n    [-f,--forceDelete] - remove source without confirmation\n    [-k,--keepGoing] - report but ignore duplicate target files\n    [-v,--verbose] - print diagnostics while processing\n    [-s,--symlink] - create a symlink to dicom files in sourceDir instead of copying them\n    [-m, --move] - move files to the target directory\n    [-t,--test] - run the built in self test (requires internet)\n    [-u,--unsafe] - do not replace unsafe characters with '_' in the path\n    [--help] - print this message\n\n where sourceDir is directory to be scanned or \"\" (null string) to read file list from stdin\n\n where targetDir/\u003cpatterns...\u003e is a string defining the output file and directory\n names based on the dicom tags in the file.\n\nIf patterns are not specified, the following default is used:\n\n  %PatientName-%Modality%StudyID-%StudyDescription-%StudyDate/%SeriesNumber_%SeriesDescription-%InstanceNumber.dcm\n\nExample 1:\n\n  dicomsort data sorted/%PatientName/%StudyDate/%SeriesDescription-%InstanceNumber.dcm\n\n  could create a folder structure like:\n\n  sorted/JohnDoe/2013-40-18/FLAIR-2.dcm\n\nExample 2:\n\n  find DicomSourceDir/ | grep \"IMA$\" | dicomsort -s \"\" DicomTargetDir\n\n  would scan DicomSourceDir for file path names ending in IMA and create an\n  output directory DicomTargetDir. The folder structure will be created using\n  the default pattern with symbolic links to the source dicom data files.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieper%2Fdicomsort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpieper%2Fdicomsort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieper%2Fdicomsort/lists"}