processing_stream_-_image_file_conversion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
processing_stream_-_image_file_conversion [2010/05/26 17:26] – Added another layer of fileparts to the removal loop jochen | processing_stream_-_image_file_conversion [2010/05/26 17:34] – Corrected the target path, etc. jochen | ||
---|---|---|---|
Line 49: | Line 49: | ||
% find dicom files | % find dicom files | ||
- | dcmfiles = findfiles(importdirs{dc}, | + | dcmfiles = findfiles(importdirs{dc}, |
| | ||
% no files, continue | % no files, continue | ||
Line 58: | Line 58: | ||
% figure out the target folder | % figure out the target folder | ||
[study, target] = fileparts(fileparts(dcmfiles{1})); | [study, target] = fileparts(fileparts(dcmfiles{1})); | ||
+ | | ||
+ | % re-vamp the target folder name (which for us is NUMVOLr_NUMSCAN) | ||
+ | target_particles = regexp(target, | ||
+ | if isempty(target_particles) || ... | ||
+ | numel(target_particles{1}) ~= 2 | ||
+ | continue; | ||
+ | end | ||
+ | target = sprintf(' | ||
+ | str2double(target_particles{1}{2}), | ||
+ | str2double(target_particles{1}{1})); | ||
| | ||
% create target folder | % create target folder | ||
- | target = [fileparts(study) '/run_' target]; | + | target = [fileparts(study) '/func/' target]; |
mkadir(target); | mkadir(target); | ||
| |
processing_stream_-_image_file_conversion.txt · Last modified: 2010/05/30 03:36 by jochen