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?

 채택된 답변

Sean de Wolski
Sean de Wolski 2012년 8월 10일

1 개 추천

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

댓글 수: 1

shaleen
shaleen 2012년 8월 10일
편집: shaleen 2012년 8월 13일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by