-
AuthorPosts
-
12/27/2016 at 6:52 AM #1824PhilipMParticipant
Hi there, trying to work with the latest release. Unfortunately it seems unable to find my correctly named anatomical images in the subject folder:
Error using ea_assignpretra (line 16)
No anatomy information found!
Please put either anat_t2.nii, anat_t1.nii or anat_pd.nii into subject
folder.I’ve tried putting back in the old ea_assignpretra.m from the previous version but that creates a heap of new errors.
I’ve got anat.nii anat_t1.nii and rpostop_ct in the subject folder, which are already coregistered and resliced.
Thanks for your help.
12/27/2016 at 11:49 AM #1825ningfeiKeymasterHi Philip,
First, if you have anat.nii and anat_t1.nii in the subject folder, and you can successfully run into ea_assignpretra, the anat.nii should have been automatically renamed to anat_t2.nii . Could you maybe set a breakpoint at Line 13 in ea_assignpretra, run it again, and paste the value of options.prefs.prenii_searchstring and pfcell here?
Best,
Ningfei12/27/2016 at 6:12 PM #1827andreashornKeymasterHi Philip,
sorry to hear – adding to Ningfei’s comment, as announced in the newsletter, we changed the naming scheme of anat.nii to anat_t2.nii by default. Lead-DBS should however take care of this for compatibility reasons (i.e. rename anat.nii to anat_t2.nii) and it is weird that it didn’t work in your case.
It’d be awesome if you could follow Ningfei’s directions and paste the output here.
Best, Andy
12/28/2016 at 5:49 AM #1829PhilipMParticipantThank you, I must have overlooked the newsletter about the re-naming. Regardless, still having difficulties – here is the information:
K>> pfcell
pfcell =
{}
K>> options.prefs.prenii_searchstring
ans =
anat_*.niiAnd just in case it helps – here is the pasted ea_assignpretra:
function [options, presentfiles] = ea_assignpretra(options)
directory = [options.root,options.patientname,filesep];
presfiles=dir([directory,options.prefs.prenii_searchstring]);
pfcell = {presfiles.name}’;% order the anatomical images in accordance with ‘prefs.prenii_order’
prenii_order = cellfun(@(x) strrep(options.prefs.prenii_searchstring,’*’,x), options.prefs.prenii_order, ‘UniformOutput’, 0);
[~,idx] = ismember(prenii_order, pfcell);
presentfiles = pfcell([nonzeros(idx)’,setdiff(1:numel(pfcell),nonzeros(idx))]);if isempty(presentfiles)
ea_error([‘No anatomy information found!\nPlease put either ‘, …
prenii_order{1},’, ‘,prenii_order{2},’ or ‘,prenii_order{3},’ into subject folder.’], …
‘Error’, dbstack);
end% set prenii_unnormalized
options.prefs.prenii_unnormalized = presentfiles{1};% determine primary template
if any(idx)
options.primarytemplate = options.prefs.prenii_order{find(idx,1)};
else % could happen if neither T2, T1 or PD is present but only custom sequences are being used
options.primarytemplate = ‘t2’; % default T2.
end12/28/2016 at 9:06 AM #1830ningfeiKeymasterHi Philip,
It’s really weird that dir([directory,options.prefs.prenii_searchstring]); return an empty cell. Could you check the value of directory and also paste here? If your images are under the directory folder, pfcell should not be empty as I see.
Best,
Ningfei12/28/2016 at 10:42 AM #1831PhilipMParticipantAh, checking directory has solved the problem. I had renamed my folders with the suffix “v2.0” as I am re-running previous analyses and Matlab was confused by the decimal point. Sorry for the confusion and thanks for your assistance.
12/28/2016 at 11:39 AM #1833ningfeiKeymasterNo problem. Good to know you solved it :)
-
AuthorPosts
- The forum ‘Support Forum (ARCHIVED – Please use Slack Channel instead)’ is closed to new topics and replies.