Skip to content

Commit 3261eec

Browse files
committed
add comments
1 parent 8ff868d commit 3261eec

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

demos/roi/get_peak_coordinates.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
% (C) Copyright 2020 CPP ROI developers
2+
3+
% Shows how to get the peak coordinate within a ROI
14
roiImage = extractRoiFromAtlas(pwd, 'wang', 'V1v', 'L');
25

6+
% Data to read the maximum from
37
gunzip(fullfile(pwd, 'inputs', '*.gz'));
48
dataImage = fullfile(pwd, 'inputs', 'TStatistic.nii');
59

10+
% If there is no value above a certain threshold the function will return NaN
11+
threshold = 1;
12+
13+
% The image and the ROI must have the same dimension if we want to use the thresold option
614
reslicedImages = resliceRoiImages(dataImage, roiImage);
715

8-
[worldCoord, voxelCoord, maxVal] = getPeakCoordinates(dataImage, reslicedImages);
16+
% Get to work.
17+
[worldCoord, voxelCoord, maxVal] = getPeakCoordinates(dataImage, reslicedImages, threshold);

src/roi/getPeakCoordinates.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
%
2020
% (C) Copyright 2021 CPP ROI developers
2121

22+
% TODO
23+
% if no threshold is requested images do not need to be at the samre resolution
24+
2225
isFile = @(x) exist(x, 'file') == 2;
2326

2427
args = inputParser;

0 commit comments

Comments
 (0)