File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 8
8
% roiImage = extractRoiFromAtlas(outputDir, atlasName, roiName, hemisphere)
9
9
%
10
10
% :param outputDir:
11
- % :param atlasName: ``wang``, ``neuromorphometrics``, ``'hcpex'``
11
+ % :param atlasName: ``' wang' ``, ``'visfatlas'``, ``' neuromorphometrics' ``, ``'hcpex'``
12
12
% :param roiName: run ``getLookUpTable(atlasName)`` to get a list of ROI names to choose from
13
13
% :param hemisphere: ``L`` or ``R``
14
14
% :type outputDir: string
Original file line number Diff line number Diff line change @@ -21,15 +21,23 @@ function unzipAtlas(atlas)
21
21
' subj_vol_all' ), ...
22
22
' ^.*_dseg.nii.gz$' );
23
23
24
- gunzip(cellstr(labelImages ));
24
+ if isOctave()
25
+ gunzipWithOctave(cellstr(labelImages ));
26
+ else
27
+ gunzip(cellstr(labelImages ));
28
+ end
25
29
26
30
end
27
31
28
32
case ' visfatlas'
29
33
30
34
file = fullfile(atlasDir , ' visfAtlas/space-MNI_atlas-visfAtlas_dseg.nii.gz' );
31
35
32
- gunzip(file );
36
+ if isOctave()
37
+ gunzipWithOctave(file );
38
+ else
39
+ gunzip(file );
40
+ end
33
41
34
42
case ' hcpex'
35
43
@@ -39,11 +47,17 @@ function unzipAtlas(atlas)
39
47
40
48
file = fullfile(returnAtlasDir(' hcpex' ), ' HCPex.nii.gz' );
41
49
if isOctave()
42
- copyfile(file , fullfile(returnAtlasDir(' hcpex' ), ' HCPex.nii.gz.bak' ));
50
+ gunzipWithOctave(file );
51
+ else
52
+ gunzip(file );
43
53
end
44
54
45
- gunzip(file );
46
-
47
55
end
48
56
49
57
end
58
+
59
+ function gunzipWithOctave(file )
60
+ copyfile(file , [file ' .bak' ]);
61
+ gunzip(file );
62
+ copyfile([file ' .bak' ], file );
63
+ end
You can’t perform that action at this time.
0 commit comments