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?

 Réponse acceptée

Sean de Wolski
Sean de Wolski le 10 Août 2012
Why not just use:
mydcmfiles = dir('*.dcm');
To create a structur containing the names of all of the files?

1 commentaire

shaleen
shaleen le 10 Août 2012
Modifié(e) : shaleen le 13 Août 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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur DICOM Format dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by