User Tools

Site Tools


processing_stream_-_image_file_conversion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
processing_stream_-_image_file_conversion [2010/05/26 17:19] – created jochenprocessing_stream_-_image_file_conversion [2010/05/26 17:26] – Added another layer of fileparts to the removal loop jochen
Line 34: Line 34:
  
 % find all folders that contain DICOM import files (sessions) % find all folders that contain DICOM import files (sessions)
-importdirs = findfiles([pwd '/CHIP*/func/raw'], '*', 'dirs=1');+importdirs = findfiles([pwd '/CHIP*/func/raw'], '*', 'dirs=1', 'depth=1');
  
 % remove subjects that have already been imported % remove subjects that have already been imported
-donedirs = findfiles([pwd '/CHIP*/func'], 'run*', 'dirs=1');+donedirs = findfiles([pwd '/CHIP*/func'], 'run*', 'dirs=1', 'depth=1');
 for dc = 1:numel(donedirs) for dc = 1:numel(donedirs)
  
     % take out those which match the CHIP* part     % take out those which match the CHIP* part
-    [study, chip] = fileparts(fileparts(donedirs{dc}));+    [study, chip] = fileparts(fileparts(fileparts(donedirs{dc})));
     importdirs(~isemptycell(regexp(importdirs, chip))) = [];     importdirs(~isemptycell(regexp(importdirs, chip))) = [];
 end end
processing_stream_-_image_file_conversion.txt · Last modified: 2010/05/30 03:36 by jochen