Lead-DBS
  • Home
  • About
    • Quickstart Primer (Post-OP MR-Scans)
    • Data & Code inclusion philosophy
    • Quickstart Primer (Post-OP CT-Scans)
    • Deep Brain Stimulation
    • Lead Connectome
    • Publications
    • List of Lead-DBS dependencies
    • Citing Lead-DBS
  • News
  • Contact
  • Help/Support
    • Manual
    • Knowledge Base
      • Atlases/Resources
        • Subcortical Atlases (MNI-Space)
        • Cortical Atlas Parcellations (MNI-Space)
        • Macaque Atlases (MNI-Space)
        • The DISTAL atlas
        • FEM-based VTA model
        • Normative Connectomes
      • Lead-DBS Methods
        • Subcortical Electrophysiology Mapping (SEM)
        • AC/PC to MNI conversion
        • Connectivity Benefit Mapping
      • Other Videos
      • Screenshots
      • Walkthrough-Videos
    • Slack User Channel
    • Forum
  • Workshops
    • Past workshops
      • Berlin 2016
      • Shanghai September 2018
      • Hamburg February 2019
    • Berlin September 2019
    • Machine Learning – Berlin September 2019
    • Brisbane February 2020
  • Download
  • Lead-Connectome
  • Search
  • Menu Menu

Normalization

You are here: Home1 / Forums2 / Support forum ARCHIVED – Please use Slack Channel instead3 / Normalization4
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • 10/28/2016 at 6:11 PM #1574
    Katherine
    Participant

    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’
    Done

    And 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 #1575
    andreashorn
    Keymaster

    Dear 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 #1576
    Katherine
    Participant

    Hi 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 Callback

    Best,
    Katherine

    10/29/2016 at 9:01 PM #1577
    andreashorn
    Keymaster

    Sorry 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 #1578
    Katherine
    Participant

    Hi 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 Callback

    Best,
    Katherine

    10/30/2016 at 4:00 PM #1579
    andreashorn
    Keymaster

    Okay, 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 #1586
    Katherine
    Participant

    Thanks 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 Callback

    I 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,
    Katherine

    11/02/2016 at 7:02 PM #1587
    andreashorn
    Keymaster

    Hi Katherine,

    did you re-uncomment the lines we commented before?
    Probably that’s the reason.

    Best, Andy

    11/02/2016 at 8:34 PM #1588
    Katherine
    Participant

    Hi 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 #1589
    andreashorn
    Keymaster

    Weird. 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 #1591
    Katherine
    Participant

    Hi 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 #1593
    andreashorn
    Keymaster

    Oh 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 #2144
    Atefeh
    Participant

    Hello,
    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

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Support forum ARCHIVED – Please use Slack Channel instead’ is closed to new topics and replies.

Your Account

Log In
Register

Forum Statistics

Registered Users
132
Forums
1
Topics
185
Replies
607
Topic Tags
81

Subscribe to our newsletter

Latest Tweets

  • Tweet Avatar
    leaddbs
    @leaddbs
    Nice study led by @DrAlfonsoFasano on GPi-DBS for pediatric dystonia. Voxel cluster most associated with clinical i… https://t.co/IScNqVQX94

    1d
  • Tweet Avatar
    leaddbs
    @leaddbs
    This is probably the oldest easteregg in @leaddbs, surprising that it survived until now from the very first releas… https://t.co/qqcUBw3nW1

    5d
  • Tweet Avatar
    leaddbs
    @leaddbs
    RT @Chencheng_Zhang: Our study demonstrates the beneficial effects of GPi-DBS for treating camptocormia in PD patients in the short term https://t.co/eq03g2oKb2

    5d

Recent Posts

  • Lead-DBS on the cover of NeuroImage
  • Lead-DBS on the cover of Biological Psychiatry
  • Lead-DBS on the cover of Annals of Neurology
  • Crucial methodological updates for Lead-DBS
  • 2nd Lead-DBS Workshop in Shanghai, China

Archives

  • September 2020
  • June 2019
  • November 2018
  • September 2018
  • August 2018
  • March 2018
  • November 2017
  • September 2017
  • July 2017
  • April 2017
  • July 2016
  • June 2016
  • May 2016
  • March 2016
  • December 2015
  • November 2015
  • April 2015
  • January 2015
  • December 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014

Impressum & Datenschutzerklärung

Scroll to top