Giter VIP home page Giter VIP logo

netstim / leaddbs Goto Github PK

View Code? Open in Web Editor NEW
91.0 91.0 98.0 5.94 GB

Lead-DBS is a MATLAB toolbox facilitating deep brain stimulation electrode localization and connectomic neuroimaging.

Home Page: https://www.lead-dbs.org

License: Other

HTML 0.09% MATLAB 87.50% M 0.49% C++ 2.57% C 0.76% Mathematica 1.22% Shell 0.19% Makefile 0.06% TeX 0.01% Mercury 0.01% Java 0.03% Python 6.84% Objective-C 0.01% CMake 0.07% AMPL 0.11% Rich Text Format 0.01% Cython 0.04%

leaddbs's People

Contributors

adhusch avatar akapp avatar andreashorn avatar arashgmn avatar artenobot avatar brainmodulationlab avatar cboulay avatar daniel-tojal avatar garancemeyer avatar hollundb avatar jachtzehn avatar kinway25 avatar lahart21 avatar laurentheirendt avatar loicmarx avatar mehrib avatar neumann-wj avatar ningfei avatar nrajamani3 avatar oprienrico avatar patrizvar avatar peterpan0716 avatar plettigp avatar qrabbani avatar riosana avatar simonoxen avatar till-dembek avatar toddherrington avatar tperera avatar tsieger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaddbs's Issues

Check Normalisation crashs

When checking checking normalisation of MR the 'A' 'S' 'C' buttons vanish when you click on them.
This only happens in the check windows other than the preoperative one (e.g transversal, coronar...)

Unify Normalization warp file from ANTs to SPM format

The normalization files generated by ANTs should be kept in the same format as SPM generates them for compatibility reasons in lead connectome.

SPM routines produce a warp file called
y_ea_normparams.nii

ANTs normalization generates 2 files:
lanat0GenericAffine.mat
and
lanat1Warp.nii.gz

-> These can probably be combined into a deformation file using the SPM deformations utility.

differing Treshholds BRAINSFit

When opening LEAD the Thresholds for BRAINSFit are something like 0.6,0.4, but when you choose a different Coreg Method and then switch back to BRAINSFit, the Threshold is set to nan.

Write composite transform for ANTs

with -a 1, a composite transform can be output via ANTs which makes filehandling much easier.
If we embed this, also need to modify ea_map_coords to just use the unified (inverse) transform.

delete "variable type" entry in regressor edit figure

Dear Ningfei, you recently changed the variable type from three radio buttons to one dropdown menu in lead_group' ea_edit_regressor.fig
That's great but I would not allow the dropdown to be set into "variable type". It should have only three entries, i.e. 1 per patient, 1 per contact and 1 per pair. It can be default to 1 per patient. If you click edit in lead group, it should automatically detect the type of regressor and be set to that type.
This already worked once the code was using radiobuttons (these were toggled on/off automatically). But now, if I want to edit a regressor that is i.e. a 1 per contact pair variable, the window opens with "variable type" set, not with "1 per contact" set.
Also, it is allowed to save the regressor with "variable type" selected.
I would delete the entry "variable type" completely, if possible.

Pathhandling in MesoGT

Need to change the two mfilename calls in mesoGT to make it deployable.

Error using load
Unable to read file '/lead_dbs/dev/mesoft/dwidirections.mat'. No such file or directory.

Error in mesoGT_tool (line 185)

Error in ea_ft_mesotracking_reisert (line 158)

Error in ea_perform_lc>ea_perform_ft_proxy (line 89)

Error in ea_perform_lc (line 14)

Error in performlc (line 19)

MATLAB:load:couldNotReadFile

Incorporate Gibbstracker into Lead-DBS

Incorporate and maintain Gibbstracker into the lead dbs repository.
Every function should have an ea_ prefix for compatibility reasons! If not, parallel installation of DTI&Fibertools and Lead-DBS will lead to crashes.

Write composite transform for ANTs

with -a 1, a composite transform can be output via ANTs which makes filehandling much easier.
If we embed this, also need to modify ea_map_coords to just use the unified (inverse) transform.

Support writeout of transformation matrix in BRAINSFit

Already discussed with Philip. Brainsfit doesn't seem to write the xform (small textfile) out. It would be great if it did. Already modified the .m file accordingly so that it would use the priorly estimated transform matrix in a second run of Brainsfit. However, since it doesn't write out the xform, it doesn't work for now..
If anyone of you guys had an idea on how to fix this, I think it could drastically reduce time in some reconstructions.

Contrast manager problem

when changing contrast/offset in manual_reconstruction figure, it's possible to generate an error for extreme values.

Add BRAINSFit as MEX to Lead-DBS

For now, BRAINSFit can be called via Lead in CT/MRI fusion by the system() command on a Mac. Better would be a Mex-File integration of BRAINSFit in Matlab. Only if we find time for this..

Add new features to coreg_check figure

Great would be

  1. A slider that can fade between the two images
  2. Windowing for both images, best even with shortcuts for brain and bone window in case of CT.
  3. pressing space bar would change the view from axial, saggital and coronar views.

This is highly optional again..

Issue with L-R-Flip

Reported by pDeman: Sometimes in 3D view, anatomy of the patient seems flipped (probably because of negative voxel size in x-dimension).

bildschirmfoto 2015-12-07 um 17 52 13

Error while trying to review reconstruction

I tried to review the reconstruction but after hitting the run button this error showed up: (Subject G, folder Dystonia)

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead('run_button_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback

2D Writeout: "Use none" Atlas

reported by pDeman, "Use none" seems not to work in 2D-output:

When atlas “use none”:
Generating Atlas table (first run with new atlas only). This may take a while...
Building atlas table...
Error using spm_vol>spm_vol_hdr (line 80)
File "/home/b67-belledone/Desktop/locate_dbs/lead_dbs/atlases/Use none/gm_mask.nii" does not exist.
Error in spm_vol (line 61)
v = spm_vol_hdr(deblank(P(i,:)));
Error in ea_genatlastable (line 282) V=spm_vol([options.earoot,'atlases',filesep,options.atlasset,filesep,'gm_mask.nii']);
Error in ea_add_overlay (line 13) atlases=ea_genatlastable([],options.earoot,options);
Error in ea_writeplanes (line 210) cuts=ea_add_overlay(boundboxmm,cuts,tracor,options);
Error in ea_write (line 12) cuts=ea_writeplanes(options);
Error in ea_manualreconstruction>ea_endfcn (line 161) ea_write(options);
Error in ea_manualreconstruction>ea_keystr (line 184) ea_endfcn;
Error while evaluating figure KeyPressFcn

dartelmni_6_hires.nii.gz missing

*** Segmentation of preoperative MRI done.
Error using checkfilename>validateFilename (line 165)
Function GUNZIP was unable to find file ''/home/philip/_git/lead_dbs/templates/dartel/create_mni_darteltemplate/dartelmni_6_hires.nii.gz''.

Error in checkfilename (line 49)
[fullfilename, fid] = validateFilename( ...

Error in gunzip>checkFilesURLInput (line 118)
[fullFileName, url] = checkfilename(inputFiles{1}, validExtensions, fcnName, ...

Error in gunzip (line 61)
[files, url, urlFilename] = checkFilesURLInput(files, {'gz'},'FILES',mfilename);

Error in ea_create_mni_darteltemplate (line 5)
gunzip([wd,'dartelmni_6_hires.nii.gz']);

Error in ea_normalize_spmdartel (line 105)
ea_create_mni_darteltemplate([options.root,filesep,options.patientname,filesep,'rc1',options.prefs.prenii_unnormalized]);

Error in ea_autocoord (line 84)
eval([options.normalize.method,'(options)']); % triggers the normalization function and passes the options struct to it.

Error in lead>run_button_Callback (line 306)
ea_autocoord(options);

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in lead (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)lead('run_button_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

Bug in BRAINSfit

Hi Ningfei,

starting today, my Brainsfit version shows an error:
Coregistering postop CT to preop MRI...
/PA/Neuro/_projects/lead/lead_dbs/ext_libs/BRAINSFit/BRAINSFit.MACI64: line 1: version: command not found
/PA/Neuro/_projects/lead/lead_dbs/ext_libs/BRAINSFit/BRAINSFit.MACI64: line 2: oid: command not found
__TEXT __DATA __OBJC others dec hex
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size: can't open file: 22527192 (No such file or directory)

Do you know why? Did you change it at all? Used to work fine. Could also be the data if you didn't change anything.

Best, Andy

Add "open in lead group" button to lead GUI

We should add a button "group analysis" that opens lead_group with the selected patients loaded and directly asks for a group directory where to store the group analysis.

Unify nifti loading and writing and add .nii.gz support

I still think that .nii should be the default since then images can be passed into SPM without unzipping/zipping wraps. But as a first step, we should use ea_load_nii for all nifti loading and one function for all nifti writeouts. For historical reasons, I often used the command pair V=spm_vol and then X=spm_read_vols(V) which loads the nifti.

In nii=ea_load_nii;

nii equals V but has the additional .img field which equals X.

This is a major hack and could lead to many errors if not properly tested.
For many SPM-related functions, the filename (and not the image itself) is passed to SPM, which doesnt support .nii.gz
So I would think that we should keep .nii as the default and maybe add .nii.gz support for reading once we have all calls canaled into ea_load_nii.

Error on update

P. Deman reported the following error code:

Error when doing the update:
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ea_update (line 57) dels=textscan(fopen([earoot,'
Error in lead>updatebutn_Callback (line 1466) ea_update;
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in lead (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)lead('
Error while evaluating uicontrol Callback >>

Add ANTS normalization to Lead-DBS

Already discussed with philip, similar to BRAINSFit, ANTS is a highly modern normalization routine. Maybe it's even better than brainsfit for CT/MR coregistration.

It would be great to have a wrapper or mex file for ANTS in lead-dbs, too.

Potentially, we could even use ANTs for nonrigid (fluid) normalization of MR images into MNI space. For now, we only use SPM routines (especially DARTEL).
In Klein (2009, NeuroImage), several normalization routines were evaluated and the two winners were DARTEL and ANTs. Arno Klein told me, that he personally even likes ANTs better. So having an ANTs version that could be called from within LEAD could be a cool gadget.

The whole thing is highly optional, so only consider if you're bored :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.