-
AuthorPosts
-
10/28/2016 at 6:11 PM #1574KatherineParticipant
Hi,
I recently downloaded Lead-DBS from your website. I am using matlab2012 and SMP12. My pre-op image is T2 Axial series. My post-op image includes the Ax 3dSPGR. I also have COR and Sag FSPGR Reform images. I converted to nii and renamed according to the instructions. I am struggling with the normalization process and would appreciate your help. When I try to run the normalization (ANT) I get the following warning:
Running ‘Image Calculator’
Warning: The images do not all have the same dimensions – using 1st image
Warning: The images do not all have same orientation and/or voxel sizes. – using first image
ImCalc Image … then gives path to lanat, lpost op etc
Done ‘Image Calculator’
DoneAnd then error message.
Warning: Error showing normalization of
C:\Users\….\glanat.nii,1
> In ea_show_normalization at 115
In ea_autocoord at 124
In ea_run at 95
In lead_dbs>run_button_Callback at 259
In gui_mainfcn at 96
In lead_dbs at 43
In @ (hObject,eventdata)lead_dbs(‘run_button_Callback’,’Object,eventdata,guidata(hObject))Best, Katherine
10/28/2016 at 11:24 PM #1575andreashornKeymasterDear Katherine,
sorry to hear – two things:
1. please completely ignore the warning about the Image Calculator. It’s actually a “feature not a bug” we abuse the SPM Image Calculator to get images into the exact same space. It’s misleading for users, of course, and I wanted to disable the warnings for a long time already.. But in general you can safely ignore all warnings in Lead-DBS..2. Regarding the error – it seems to happen in the “Show Normalization” Step (not in the actual normalization process). So I think images should have been normalized. You could check e.g. with SPM check coreg or 3D Slicer whether gl*.nii files are in MNI space (e.g. compare them to the file mni_hires.nii in the lead/templates/ folder).
It’s still very weird that you cannot visualize normalization directly in Lead-DBS.
To debug, could you please comment lines 22 and 126-128 in ea_show_normalization and rerun the “Check Normalization” Step only?
Post the error message here then if you get the chance.Best, Andy
10/29/2016 at 8:14 AM #1576KatherineParticipantHi Andy,
Thanks for your response. This is the error message I obtain when I comment out lines 22, and 26-28 in ea_show_normalization.
Error: File: ea_show_normalization.m Line: 114 Column: 5
Illegal use of reserved keyword “catch”.
Error in ea_autocoord (line 124)
ea_show_normalization(options);
Error in ea_run (line 95)
ea_autocoord(options);
Error in lead_dbs>run_button_Callback (line 250)
ea_run(‘run’,options);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in lead_dbs (line 43)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)lead_dbs(‘run_button_Callback’,hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol CallbackBest,
Katherine10/29/2016 at 9:01 PM #1577andreashornKeymasterSorry Katherine,
the line numbers I told you were wrong.. Please revert the changes made and instead comment out lines
22 as well as 114-116 – and send me the error that will pop up then.Best, Andy
10/30/2016 at 6:12 AM #1578KatherineParticipantHi Andy,
Thanks! I was wondering about the lines. This is the error message I get now.
Error in zscore (line 3)
MeanM = ones(size(M, 1), 1) * mean(M);
Error in ea_show_normalization (line 91)
mni_img.img(:)=zscore(mni_img.img(:));
Error in ea_autocoord (line 124)
ea_show_normalization(options);
Error in ea_run (line 95)
ea_autocoord(options);
Error in lead_dbs>run_button_Callback (line 250)
ea_run(‘run’,options);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in lead_dbs (line 43)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)lead_dbs(‘run_button_Callback’,hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol CallbackBest,
Katherine10/30/2016 at 4:00 PM #1579andreashornKeymasterOkay, thanks! Seems you are using a different zscore script which is masking the original Matlab one.
If you type
which zscore
you will see which file Matlab uses when zscore is called. You could then rename/delete that file if it’s not relevant for other projects and/or remove it from the Matlab path.Then it should work I guess – and you could afterwards uncomment the lines again.
Best, Andy
11/02/2016 at 6:59 PM #1586KatherineParticipantThanks Andy,
I eliminated the other zscore script. However, I still cannot view the normalization. The error message that comes up is:
Error in ea_show_normalization (line 86)
pt.img=(pt.img-min(pt.img(:)))/(max(pt.img(:)));
Error in ea_autocoord (line 124)
ea_show_normalization(options);
Error in ea_run (line 95)
ea_autocoord(options);
Error in lead_dbs>run_button_Callback (line 250)
ea_run(‘run’,options);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in lead_dbs (line 43)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)lead_dbs(‘run_button_Callback’,hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol CallbackI am able to proceed to the next step to “pre-construct” and “localize DBS electrodes”. The localization is way off however — it places the electrode in the cortex. The co-registration looks fine in SPM when I use the T1 SPGR image but not when I use my lower resolution T2 image. I appreciate your help.
Best,
Katherine11/02/2016 at 7:02 PM #1587andreashornKeymasterHi Katherine,
did you re-uncomment the lines we commented before?
Probably that’s the reason.Best, Andy
11/02/2016 at 8:34 PM #1588KatherineParticipantHi Andy,
I did uncomment the lines and obtained a general error. Then I re-commented them before I sent the error message.
Warning: Error showing normalization of
C:\…\glanat.nii,1.
> In ea_show_normalization at 115
In ea_autocoord at 124
In ea_run at 95
In lead_dbs>run_button_Callback at 250
In gui_mainfcn at 96
In lead_dbs at 43
In @(hObject,eventdata)lead_dbs(‘run_button_Callback’,hObject,eventdata,guidata(hObject))Best,
Katherine
11/02/2016 at 8:40 PM #1589andreashornKeymasterWeird. Could you send me the general error (when uncommenting the lines)
The snippet in your last message is just a warning (no error).
Best, Andy
11/02/2016 at 10:26 PM #1591KatherineParticipantHi Andy,
You are correct. There is no error – just a warning for each gl image stating that there is an error showing normalization. I assumed there was an error though because the windows are not popping up so I can check or view the normalization. Do you know why this might be?
Best,
Katherine
11/03/2016 at 12:40 AM #1593andreashornKeymasterOh okay – sorry for not getting that.
could you again send me the error that shows up? Unfortunately, in your message from 6:59 the crucial first line is missing :(
sorry that this is so complicated. It really should work well, usually..
Best, Andy
02/27/2017 at 11:45 AM #2144AtefehParticipantHello,
I am trying to normalize the images, but I get this error:Undefined function or variable “to”.
Error in ea_normalize_ants (line 80)
ea_ants_nonlinear(to,from,[directory,options.prefs.gprenii],weights,metrics,options);Error in ea_autocoord (line 92)
eval([options.normalize.method,'(options)’]); % triggers the normalization function and passes the options struct to it.Error in ea_run (line 89)
ea_autocoord(options);Error in lead_dbs>run_button_Callback (line 192)
ea_run(‘run’,options);Error in gui_mainfcn (line 95)
feval(varargin{:});Error in lead_dbs (line 43)
gui_mainfcn(gui_State, varargin{:});Error in @(hObject,eventdata)lead_dbs(‘run_button_Callback’,hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
I would be happy, if someone could help.
Best,
Atefeh -
AuthorPosts
- The forum ‘Support Forum (ARCHIVED – Please use Slack Channel instead)’ is closed to new topics and replies.