GithubHelp home page GithubHelp logo

adhusch / pacer Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 9.0 9.33 MB

PaCER - Precise and Convenient Electrode Reconstruction for Deep Brain Stimulation

License: GNU Affero General Public License v3.0

MATLAB 99.93% Shell 0.07%

pacer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pacer's Issues

Function name clash - oor and orr

Function orr is defined in oor.m, which is not coherent.

Error from documentation generation:

WARNING: [sphinxcontrib-matlabdomain] Unexpected function name: "orr". Expected "oor" in module "src.Functions".

@adhusch, what is the correct name?

cc: @Daniel-Tojal

PaCER preprocessing error in LeadDBS

Dear all,
i'm trying to recostruct electrode trajectory using PaCER inside the toolbox matlab Lead-DBS and I got this error:

Warning: PaCER failed with the following error:
In ea_autocoord (line 270)
In ea_run (line 96)
In lead_dbs>run_button_Callback (line 187)
In gui_mainfcn (line 95)
In lead_dbs (line 43)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead_dbs('run_button_Callback',hObject,eventdata,guidata(hObject))
Identifier:
Message: PaCER returned a different number of electrodes than expected by LeadDBS! In most cases this indicates an error in PaCER preprocessing (brain mask estimation) due to untypical CT data. Please provide a brain mask to PaCER in this case using the mask parameter.
In: C:\Users\BIOING\Desktop\STUDI\lead\ea_runpacer.m
Method: ea_runpacer
Line: 17
Please check your input data carefully.
Error using ea_reconstruct_trajectory (line 282)
Mask out of bounds! Must have lost trajectory...
Please try a different 'Mask window size' or try manual mode by setting 'Entrypoint for Target' to
'Manual'.
Error while evaluating UIControl Callback.

So i tried to run the "standalone use" of PaCER using my postop_CT images (.nii) and i got this error:

Error using extractElectrodePointclouds (line 96)
NO electrode artifact found within brain mask. Did you supply a post-op brain CT image? \n Try the 'no
mask' parameter in case of phantom scans without brain. \n Try providing an externally created brain
mask using the "brainMask" parameter in other cases.
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in extractElectrodePointclouds (line 92)
[elecsPointcloudStruct, brainMask] = extractElectrodePointclouds(niiCT, 'brainMask',
args.brainMask, 'metalThreshold', METAL_THRESHOLD * 0.8, 'medtronicXMLPlan',
args.medtronicXMLPlan);
Error in PaCER (line 51)
elecPointCloudsStruct = extractElectrodePointclouds(niiCT, varargin{:}); % preprocessing

Can somebody help me? Can someone give me some explanations?
Thanks in advace for your collaboration.
Regards,
Arianna

recostruction issue using PaCER on Lead-DBS

Dear all,
i'm using PaCER inside the toolbox matlab Lead-DBS. I usually work on CT scan, the pipe line seems to work, but I’ve run into difficulties with the recostruction steps. I got this error

Error using ea_reconstruct_trajectory (line 282)
Mask out of bounds! Must have lost trajectory...
Please try a different 'Mask window size' or try manual mode by setting 'Entrypoint for Target' to
'Manual'.

Error while evaluating UIControl Callback.

Can somebody help me?
Thanks in advace for your collaboration.
Regards,
Arianna

Lead-DBS PaCER Error

Hi Team,
I have fairly consistently received this error recently when running PaCER within Lead DBS. I have used the default co-registration and normalization settings, followed by brainshift correction.

1st Pass Electrode Length within Brain Convex Hull: 61.2896mm
2nd Pass Electrode Length within Brain Convex Hull: 62.3233mm
Warning: PaCER or the LeadDBS Wrapper for PaCER failed with the following error:

In ea_autocoord (line 275)
In ea_run (line 96)
In lead_dbs>run_button_Callback (line 197)
In gui_mainfcn (line 95)
In lead_dbs (line 43)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead_dbs('run_button_Callback',hObject,eventdata,guidata(hObject))
Identifier: MATLAB:UndefinedFunction
Message: Undefined function 'filtfilt' for input arguments of type 'double'.
In: /Applications/lead/ext_libs/PaCER/src/Functions/refitElec.m
Method: refitElec
Line: 81
Please check your input data carefully.
If the error persists, please consider a bug report at https://github.com/adhusch/PaCER/issues.
Error using ea_error (line 16)
PaCER failed. Potentially try running the TRAC/CORE Algorithm or a fully manual pre-reconstruction.

Error in ea_autocoord (line 283)
ea_error('PaCER failed. Potentially try running the TRAC/CORE Algorithm or a fully
manual pre-reconstruction.');

Error in ea_run (line 96)
ea_autocoord(options);

Error in lead_dbs>run_button_Callback (line 197)
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
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead_dbs('run_button_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

Coordinate System of Nifti incorrect

Hi, I've tried to use PaCER to detect DBS electrodes, however the electrode locations were always placed on the wrong end of the shank (accompanied by a warning that the length of the shank is negative).

It turns out that NiftiMod seems to incorrectly load the transformation matrix of my nifti. Replacing it with NiftiModSPM (which btw. is missing a depdency .m file that is available in leaddbs), solved the issue.

elecModels{1}.initPlot3D coordinate space

Hello Dr. Husch,

Thank you for providing this incredible tool for DBS lead extractions. My question is related to visualizing the output of PaCER with various image modalities. Using the .initPlot3D method would I be able to visualize the electrode for any image space shared by the CT used to extract the lead model? Or would I need to compute an addtional transformation on the electrode output? That is, do I have to use the 'MPRWorldCoordinates', which appear proprietary?

Thank you!
John

no artifacts found

Dear Andreas Husch,
I'm trying to run PaCER on a post op CT, which was initally a DICOM file.
I transfered it to nifti using dcm2nii, and then resliced it using the reslice_nii function.
When I run PaCER with mask, it detects no artifacts, with mask it detects 876, of which 0 are found to be electrodes. I think it might be because of the cc analysis, that it expects more round artifacts for electrodes. Is there a way to alter this to make it more sensitive to other shapes? Or does it mean the quality of the CT images isn't good enough?
Thank you for making your code publicly available!
Kind Regards,
Monique

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.