Closed maedoc closed 9 years ago
Could you check if you have a $"PRD"/connectivity/aparcaseg_2_diff_cortical_only.nii and a $"PRD"/connectivity/aparcaseg_2_diff.nii.gz file?
yep both are are there. when I run curr_K=2 PRD=$(pwd)/../ SUBJ_ID=hh matlab
and run subparcel
interactively, I have the error reported above, then I see
>> exist(Msk)
ans =
2
so it's a file format issue? I tried
>> gunzip(Msk)
Error using gunzip>gunzipwrite (line 184)
File "/home/duke/vibrations/scripts/proc/hh/connectivity/aparcaseg_2_diff_cortical_only.nii" is not
in GZIP format.
I see in uniform_parcellate/read.m
if exist(strcat(fileprefix,'.hdr'),'file') & exist(strcat(fileprefix,'.img'),'file')
type=0;
hdr_filename=strcat(fileprefix,'.hdr');
data_filename=strcat(fileprefix,'.img');
elseif exist(strcat(fileprefix,'.nii'),'file')
type=1;
hdr_filename=strcat(fileprefix,'.nii');
data_filename=strcat(fileprefix,'.nii');
else
error('File missing.\n');
end
Perhaps one reads to strip the .nii
for this logic to work?
sorry clicked the wrong button
The problem is that I'm using a path containing /../
and the lines 5-10 are finding the first .
and setting fileprefix
to whatever is before that. Doing a fullfile
on the path resolves these "up" paths and allows read
to work correctly.
After deleting
$PRD/connectivity/*
and rerunning with newest mrtrix and scripts, I haveMy config.sh is
I had forgot to pull latest changes from scripts for the topup reveresed, so now I'm rerunning, but this seems like an unrelated issue so I'm posting it anyways.