Forum Replies Created
-
AuthorPosts
-
AtefehParticipant
Hi Andy,
Yes, my dataset does not include postop-data …
And in Lead DBS manual is written that it will not work without having the postop MRI data.
So, it will not show be the STN, not the electrodes for each patient. This is what I need :(Best,
AtefehAtefehParticipantI have also another question, currently I am using the PPMI database. There I cannot find postoperative MRI data. Can you please introduce me another database where I can have access to postoperative data?
Regards,
AtefehAtefehParticipantIf I open the popup menu, I will get this menu shown in this screenshot:
Do you mean that the last option, Bigbrain 100… is my specific patient?
AtefehParticipantHi Andy,
Many thanks for your explanation.
1. Yes! I think it is a template that is displaying everytime, but I dont know how to change the settings in order to display the specific patients anatomy…
2.If you look at my message at 03.02.2017, I have uploaded to images from anatomy slice panel. I did not get any answers from you for that question.
Best,
AtefehAtefehParticipantHello,
I have imported MRI of different patients to lead DBS for localization of the STN subdivisions. All the images look completely the same!!! Only the location of the STN is different.I am not sure if lead DBS is working correctly.
Any kind of help is appreciated.
Regards,
AtefehAtefehParticipantHi Andy,
I installed lead DBS again and it is working well now. Thanks for you help.
I have a question this time. I have uploaded 2 images:image 1: http://imgur.com/a/qqp8m
image 2: http://imgur.com/a/uL9BgAs I did the electrode localization previously, I got image1, but now I get image2 (with less setting options). Why is it like that?
Kind regards,
Atefeh- This reply was modified 7 years, 10 months ago by Atefeh.
AtefehParticipantDear Andy,
Is it possible that I ask you to send me a version which was available on the website before 10.Feb?
After that I updated the lead dbs and it did not work anymore…Best,
AtefehAtefehParticipantI get this:
Undefined function ‘ea_prefs’ for input arguments of type ‘char’.
Error in ea_checkleaddirs (line 2)
prefs=ea_prefs(”);Error in lead>lead_OpeningFcn (line 72)
ea_checkleaddirs;Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});Error in lead (line 42)
gui_mainfcn(gui_State, varargin{:});AtefehParticipantI did it and now I get this:
anatpresent =
Empty cell array: 1-by-0
AtefehParticipantHere I copied the ea_normalize_ants file:
function varargout=ea_normalize_ants(options,includeatlas)
% This is a function that normalizes both a copy of transversal and coronar
% images into MNI-space. The goal was to make the procedure both robust and
% automatic, but still, it must be said that normalization results should
% be taken with much care because all reconstruction results heavily depend
% on these results. Normalization of DBS-MR-images is especially
% problematic since usually, the field of view doesn’t cover the whole
% brain (to reduce SAR-levels during acquisition) and since electrode
% artifacts can impair the normalization process. Therefore, normalization
% might be best archieved with other tools that have specialized on
% normalization of such image data.
%
% The procedure used here uses the ANTs Syn approach to map a patient’s
% brain to MNI space directly.
% __________________________________________________________________________________
% Copyright (C) 2015 Charite University Medicine Berlin, Movement Disorders Unit
% Andreas Hornif ischar(options) % return name of method.
varargout{1}=’Advanced Normalization Tools (ANTs) SyN (Avants 2008)’;
varargout{2}=1;
return
endusefa=1;
usebrainmask=0;if ~exist(‘includeatlas’,’var’)
includeatlas=0;
endif ~includeatlas % second run from maget-brain segment
ea_checkcoregallmri(options,usebrainmask)
enddirectory=[options.root,options.patientname,filesep];
cnt=1;
if usebrainmask
bprfx=’b’;
else
bprfx=”;
end
spacedef=ea_getspacedef; % get definition of current space we are working in
if usefa && spacedef.hasfa % first put in FA since least important (if both an FA template and an fa2anat file is available)
if exist([directory,options.prefs.fa2anat],’file’) % recheck if now is present.
disp(‘Including FA information for white-matter normalization.’);
to{cnt}=[ea_space(options),’fa.nii’];
from{cnt}=[directory,bprfx,options.prefs.fa2anat];
weights(cnt)=0.5;
metrics{cnt}=’MI’;
cnt=cnt+1;
end
end[~,anatpresent]=ea_assignpretra(options);
anatpresent=flip(anatpresent); % reverse order since most important transform should be put in last.
% The convergence criterion for the multivariate scenario is a slave to the last metric you pass on the ANTs command line.
for anatf=1:length(anatpresent)
disp([‘Including ‘,anatpresent{anatf},’ data for (grey-matter) normalization’]);to{cnt}=[ea_space(options),ea_det_to(anatpresent{anatf},spacedef),’.nii’];
if usebrainmask && (~includeatlas) % if includeatlas is set we can assume that images have been coregistered and skulstripped already
ea_maskimg(options,[directory,anatpresent{anatf}],bprfx);
end
from{cnt}=[directory,bprfx,anatpresent{anatf}];
weights(cnt)=1.25;
metrics{cnt}=’MI’;
cnt=cnt+1;
endif includeatlas % append as last to make criterion converge on this one.
to{cnt}=[ea_space(options),’atlas.nii’];
from{cnt}=[directory,’anat_atlas.nii.gz’];
weights(cnt)=1.5;
metrics{cnt}=’MI’; % could think about changing this to CC
cnt=cnt+1;
endea_ants_nonlinear(to,from,[directory,options.prefs.gprenii],weights,metrics,options);
ea_apply_normalization(options);function masks=segmentall(from,options)
directory=[fileparts(from{1}),filesep];
for fr=1:length(from)
[~,fn,ext]=fileparts(from{fr});
switch [fn,ext]
case options.prefs.fa2anat
if ~exist([directory,’tc2′,options.prefs.prenii_unnormalized],’file’)
ea_newseg(directory,options.prefs.prenii_unnormalized,0,options);
% assume that tc2 doesn’t exist
nii=ea_load_nii([directory,’c2′,options.prefs.prenii_unnormalized]);
nii.img=nii.img>0.7;
nii.fname=[directory,’tc2′,options.prefs.prenii_unnormalized];
spm_write_vol(nii,nii.img);
end
masks{fr,1}=[ea_space(options),’c2mask.nii’];
masks{fr,2}=[directory,’tc2′,options.prefs.prenii_unnormalized];otherwise
if ~exist([directory,’tc1′,options.prefs.prenii_unnormalized],’file’)
ea_newseg(directory,options.prefs.prenii_unnormalized,0,options);
% assume that tc1 doesn’t exist
nii=ea_load_nii([directory,’c1′,options.prefs.prenii_unnormalized]);
nii.img=nii.img>0.3;
nii.fname=[directory,’tc1′,options.prefs.prenii_unnormalized];
spm_write_vol(nii,nii.img);
end
masks{fr,1}=[ea_space(options),’c1mask.nii’];
masks{fr,2}=[directory,’tc1′,options.prefs.prenii_unnormalized];
end
endif ~exist([directory,’tc1c2′,options.prefs.prenii_unnormalized],’file’)
Vc1=ea_load_nii([directory,’tc1′,options.prefs.prenii_unnormalized]);
Vc2=ea_load_nii([directory,’tc2′,options.prefs.prenii_unnormalized]);
Vc1.img=Vc1.img+Vc2.img;
Vc1.fname=[directory,’tc1c2′,options.prefs.prenii_unnormalized];
spm_write_vol(Vc1,Vc1.img);
endfunction ea_genbrainmask(options)
directory=[options.root,options.patientname,filesep];
ea_newseg(directory,options.prefs.prenii_unnormalized,0,options);
c1=ea_load_nii([directory,’c1′,options.prefs.prenii_unnormalized]);
c2=ea_load_nii([directory,’c2′,options.prefs.prenii_unnormalized]);
c3=ea_load_nii([directory,’c3′,options.prefs.prenii_unnormalized]);
bm=c1;
bm.img=c1.img+c2.img+c3.img;
bm.fname=[directory,’brainmask.nii’];
bm.img=bm.img>0.6;
spm_write_vol(bm,bm.img);function ea_maskimg(options,file,prefix)
directory=[options.root,options.patientname,filesep];
if ~exist([directory,’brainmask.nii’],’file’)
ea_genbrainmask(options);
end
[pth,fn,ext]=fileparts(file);
if ~exist([pth,filesep,prefix,fn,ext],’file’)
nii=ea_load_nii(file);
bm=ea_load_nii([directory,’brainmask.nii’]);
nii.img=nii.img.*double(bm.img);
nii.fname=[pth,filesep,prefix,fn,ext];
spm_write_vol(nii,nii.img);
endfunction template2use=ea_det_to(anatfile,spacedef)
anatfile=strrep(anatfile,’anat_’,”);
anatfile=strrep(anatfile,’.nii’,”);for avtpl=1:length(spacedef.templates)
if ismember(anatfile,spacedef.norm_mapping{avtpl})
template2use=spacedef.templates{avtpl};
return
end
end
% template still hasn’t been assigned, use misfit template if not empty:
if ~isempty(spacedef.misfit_template)
template2use=spacedef.misfit_template;
else
template2use=”;
endAtefehParticipantHere you can see a screen shot of my patient’s folder:
http://tinypic.com/r/2q1xixf/9It is not working for any patients…
AtefehParticipantI dont think that it is because of the patient’s folder, because I could localize the electrodes successfully some weeks ago and it is not working anymore now!
Best,
AtefehAtefehParticipantHi Andy,
I also installed lead dbs again, but it is still not working…
Best,
AtefehAtefehParticipantHello,
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,
AtefehAtefehParticipantHello,
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