Skip to content
Permalink
02f25a58e6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
27 lines (21 sloc) 504 Bytes
function check_slice_order(input_dir)
%
% checks slice order
% based on numbering of dicom files
%
% file history:
% created M. Czisch 13.2.2018
a = dir(input_dir);
vec = zeros(2,2);
for i=1:2
tmp_str = a(i+2).name;
tmp_str = split(tmp_str,'.');
vec(i,2) = str2num(char(tmp_str(3)));
tmp_str = split(tmp_str(1),'i');
vec(i,1) = str2num(char(tmp_str(2)));
end
if prod(diff(vec,1)) == 1
fprintf('\n\nslice order OK');
else
error('\n\nslice order ERROR');
end