Reorder DICOM data according to slice position

DICOM image slices are not in correct slice location order and their file names are not consistent, which is unable for tracing system to read.

Use Matlab to reorder and rename image files in each folder.

maindir = 'E:\C-Tsinghua\dataF';
subdir  = dir( maindir );
for i = 1 : length( subdir )
    if( isequal( subdir( i ).name, '.' )||...
        isequal( subdir( i ).name, '..')||...
        ~subdir( i ).isdir)               
    subdirpath= fullfile( maindir, subdir( i ).name);
    Filesindir= dir(fullfile( maindir, subdir( i ).name,'*.dcm' ));
    for j=1:n
        loc(j,:)=[j metadata.SliceLocation];

    for j=1:n

Last Article

Comment 评论

Share 分享

New Users 最新加入

  • hokurikustr

  • refrain

New comments 最新评论

test123: aasdas Details Apr 13 16:39
admin: Thanks! Details Apr 09 11:46
admin: Google map api Details Apr 09 11:46
lqj12: cooooooooool Details Apr 08 21:34
Yunhan Huang: 这个功能是如何实现的? Details Apr 08 13:23