Skip to content

Commit

Permalink
Add support to *.DCM and *.ima
Browse files Browse the repository at this point in the history
  • Loading branch information
sandywang committed Mar 9, 2017
1 parent 03369fc commit ac3b3be
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions GUI/gretna_GUI_PreprocessInterface.m
Original file line number Diff line number Diff line change
Expand Up @@ -1929,6 +1929,26 @@ function ChangedAction(hObject)
return
end

D=dir(fullfile(Path, [Prefix, '.DCM'])); % DCM
if ~isempty(D)
C={D.name}';
S.Num=numel(C);
S.FileList={fullfile(Path, C{1})};
S.Alias='DCM';
S.Lab=SPath;
return
end

D=dir(fullfile(Path, [Prefix, '*.ima'])); % DCM
if ~isempty(D)
C={D.name}';
S.Num=numel(C);
S.FileList={fullfile(Path, C{1})};
S.Alias='IMA';
S.Lab=SPath;
return
end

D=dir(fullfile(Path, [Prefix, '*.IMA'])); % DCM
if ~isempty(D)
C={D.name}';
Expand All @@ -1941,8 +1961,8 @@ function ChangedAction(hObject)

D=dir(fullfile(Path, Prefix)); % Unknown
Ind=cellfun(...
@(IsDir, NotDot) IsDir && (~strcmpi(NotDot, '.') && ~strcmpi(NotDot, '..') && ~strcmpi(NotDot, '.DS_Store')),...
{D.isdir}, {D.name});
@(IsDir, IsDot) ~IsDir && (~strcmpi(IsDot, '.') && ~strcmpi(IsDot, '..') && ~strcmpi(IsDot, '.DS_Store')),...
{D.isdir}', {D.name}');
D=D(Ind);
if ~isempty(D)
C={D.name}';
Expand Down

0 comments on commit ac3b3be

Please sign in to comment.