Skip to content

Commit 586a235

Browse files
authored
Merge 68a541e into 2ce5b6d
2 parents 2ce5b6d + 68a541e commit 586a235

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cff-version: 1.2.0
22

33
title: "CPP ROI"
44

5-
version: v0.2.0dev
5+
version: 0.2.0dev
66

77
abstract: Set of Octave and Matlab functions, demos and scripts to help manage ROIs and to play nice with BIDS datasets.
88

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.PHONY: clean install_dev
22

3-
clean:
3+
clean: clean_lib
44
rm -rf coverage*
5-
rm version.txt
5+
rm -f version.txt
66

77
clean_lib:
88
rm -rf lib/bids-matlab

src/roi/createRoi.m

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -332,21 +332,8 @@
332332

333333
% use Marsbar to save as a .mat and then convert that to an image
334334
% in the correct space
335-
tempFile = spm_file(roiName, ...
336-
'ext', ...
337-
'mat');
338-
saveroi(roiObject, ...
339-
fullfile(outputDir, tempFile));
340-
341335
outputFile = fullfile(outputDir, roiName);
342-
343-
mars_rois2img(fullfile(outputDir, tempFile), ...
344-
outputFile, ...
345-
spm_vol(volumeDefiningImage));
346-
delete(fullfile(outputDir, tempFile));
347-
348-
% delete label files
349-
delete(fullfile(outputDir, '*_mask_labels.mat'));
336+
save_as_image(roiObject, outputFile);
350337

351338
json = bids.derivatives_json(outputFile);
352339
bids.util.jsonencode(json.filename, json.content);

src/roi/plotDataInRoi.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
nbBins = max(nbBinsList);
154154
end
155155

156-
maxVox = getMaxVox(args, data);
156+
maxVox = getMaxVox(args, data, nbBins);
157157

158158
%% plot histogram and mode
159159

@@ -247,7 +247,7 @@ function labelAxis(roiAs, rows, cols, subplotList, roiImages, dataLabel)
247247

248248
end
249249

250-
function maxVox = getMaxVox(args, data)
250+
function maxVox = getMaxVox(args, data, nbBins)
251251

252252
maxVox = args.Results.maxVox;
253253

0 commit comments

Comments
 (0)