Skip to content

Commit 70d39b2

Browse files
committed
refactor renameFile
1 parent 98a690a commit 70d39b2

File tree

5 files changed

+11
-91
lines changed

5 files changed

+11
-91
lines changed

demos/roi/neurosynth_left_right_rois.m

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
rightRoiImage = keepHemisphere(roiImage, 'R');
1717

1818
% change the label entity and remove the hs one
19-
leftRoiImage = renameFile(leftRoiImage, ...
20-
struct('entities', struct( ...
21-
'label', 'ns left motion', ...
22-
'hemi', '')));
23-
rightRoiImage = renameFile(rightRoiImage, ...
24-
struct('entities', struct( ...
25-
'label', 'ns right motion', ...
26-
'hemi', '')));
19+
specification = struct('entities', struct('label', 'ns left motion', ...
20+
'hemi', ''));
21+
bf = bids.File(leftRoiImage);
22+
bf = bf.rename('spec', specification, 'dry_run', false, 'verbose', true);
23+
leftRoiImage = fullfile(bf.path, bf.filename);
24+
25+
specification.entities.label = 'ns right motion';
26+
bf = bids.File(rightRoiImage);
27+
bf = bf.rename('spec', specification, 'dry_run', false, 'verbose', true);
28+
rightRoiImage = fullfile(bf.path, bf.filename);

docs/source/function_description.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,3 @@ Atlas
1414
.. automodule:: src.atlas
1515

1616
.. autofunction:: returnAtlasDir
17-
18-
Utilities
19-
=========
20-
21-
.. automodule:: src.utils
22-
23-
.. autofunction:: renameFile

src/utils/renameFile.m

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/test_keepHemisphere.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
initTestSuite;
99
end
1010

11-
function test_renameFile()
11+
function test_keepHemisphere_basic()
1212

1313
inputDir = fullfile(fileparts(mfilename('fullpath')), '..', 'demos', 'roi');
1414

tests/test_unit_renameFile.m

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)