applying dicomrename to multiple files

I have been attempting to use dicomrename source: http://www.mathworks.com/matlabcentral/fileexchange/22818-dicomrename/content/dicomrename.m to rename dicom files with various header tags. It works for multiple files, if I list them each independently. But I need to apply this renaming process to every file in a directory, with the .dcm suffix. There are just too many to list in an array.
I think I need to modify the source, its written as "FILES should be a cell array of filenames."
help?

 Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 10 Aug. 2012

1 Stimme

Why not just use:
mydcmfiles = dir('*.dcm');
To create a structur containing the names of all of the files?

1 Kommentar

shaleen
shaleen am 10 Aug. 2012
Bearbeitet: shaleen am 13 Aug. 2012
thank you for the clue, i successfully created the structure and then used the structure to create the cell
fpath = 'c:\test\'; %identify path;
fstruct = dir('c:\test\*.dcm'); % acquire selected file data;
fnames = {fstruct.name}; % Create a cell array of file names;
dicomrename(fpath, fnames); %execute dicomerename;
thank you

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu DICOM Format finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by