Sort DCM files with multiple variables in the name

2 views (last 30 days)
Does anybody know an easy way to sort DCM files with two variables in the name, for example:
ADNI_002_S_0295_MR_MPRAGE_br_raw_20110602125226441_80_S110476_I238627.dcm ADNI_002_S_0295_MR_MPRAGE_br_raw_20110602125227472_51_S110476_I238627.dcm
As can be seen the first number is a recording data and a random number, the second is the slice-number. In order to sort these files, based on slice-number i need to extract the slice-number from the name and rename the files afterwards without the randomly generated number. Does anybody know an easy way to do this?

Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!