Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero pad numerical values #7

Closed
neurolabusc opened this issue Jul 4, 2018 · 1 comment
Closed

Zero pad numerical values #7

neurolabusc opened this issue Jul 4, 2018 · 1 comment

Comments

@neurolabusc
Copy link

Hello
The script works
python dicomsort.py /Users/me/unsorted /Users/me/sorted/%SeriesNumber/%InstanceNumber.dcm
but instance numbers are saved 1.dcm,2.dcm,... how does one zero pad the outputs so you get 0001.dcm, 0002.dcm,etc?

@pieper
Copy link
Owner

pieper commented Jul 4, 2018

Unfortunately there's not easy way to do that - the filename components are extracted directly from the dicom values and those are not zero padded.

I'd suggest writing a small script (in python or similar language) that does the renaming of the files after they've been sorted. Let me know if you want some hints about how to write it.

@pieper pieper closed this as completed Jul 4, 2018
neurolabusc added a commit to rordenlab/dcm2niix that referenced this issue Jul 5, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants