Closed JacMatu closed 6 months ago
I expected to build a V1 ROI from hcpex with
opt.roi.hemi = {'L', 'R'}; opt.roi.atlas = 'HCPex'; opt.roi.name = 'V1'; bidsCreateROI(opt);
L_V1 is not listed as an available ROI even though it exists in the look-up table (CPP_ROI/atlas/HCpex/HCPex_v1.0/HCPex.nii.txt) line 1: 1 L_V1 1
CPP_ROI/atlas/HCpex/HCPex_v1.0/HCPex.nii.txt
1 L_V1 1
No response
- OS: - Matlab: - SPM:
- branch: - version: v0.3.1
ERROR REASON: getLookUpTable.m with 'hcpex' atlas skips first row of the text file when looking up ROI labels and names
getLookUpTable.m
case 'hcpex' roiLabelLUT = fullfile(atlasDir, 'HCPex.nii.txt'); fid = fopen(roiLabelLUT); pattern = '%f%s%s%f'; C = textscan(fid, pattern, 'Headerlines', 1);
SOLUTION: Change C = textscan(fid, pattern, 'Headerlines', 1); to 0 to avoid skipping first line
C = textscan(fid, pattern, 'Headerlines', 1);
So this will work with V1 ROI: C = textscan(fid, pattern, 'Headerlines', 0;
C = textscan(fid, pattern, 'Headerlines', 0;
@JacMatu do feel like opening a pull request to fix this?
@all-contributors please add @JacMatu for bug, userTesting
@Remi-Gau
I've put up a pull request to add @JacMatu! :tada:
Is there an existing issue for this?
Expected Behavior
I expected to build a V1 ROI from hcpex with
Current Behavior
L_V1 is not listed as an available ROI even though it exists in the look-up table (
CPP_ROI/atlas/HCpex/HCPex_v1.0/HCPex.nii.txt
) line 1:1 L_V1 1
Error message
No response
Environment
Branch
Anything else?
ERROR REASON:
getLookUpTable.m
with 'hcpex' atlas skips first row of the text file when looking up ROI labels and namesSOLUTION: Change
C = textscan(fid, pattern, 'Headerlines', 1);
to 0 to avoid skipping first lineSo this will work with V1 ROI:
C = textscan(fid, pattern, 'Headerlines', 0;