Hi Dan,
I wrote a little script in Matlab that calculates the field map for a
Siemenst 3T Verio scanner. It's not GUI based and I'm not sure that
there is a GUI based tool for field map calculations. Please read the
description carefully and change it so that it works for you data.
Hope it helps. If you have any further questions, ask away!
Regards,
Glad MIHAI, M.Sc. Biomedical Physics
Funktionelle Bildgebung
Uni-Klinikum Greifswald
Walther-Rathenau-Straße 46
17489 Greifswald
Am 21.11.2011 11:30, schrieb Daniel ROQUET:
> Hello SPM'ers
> I would like to use the Fielmap toolbox (on spm8) in batch with SPM8
> User Interface as in Fig.24.1 of the manual. However, I don't know how
> to construct or load such a batch. Any help would be usefull.
> Thanx to everyone
> Dan
>
> --
> Daniel ROQUET
> PhD student
> Clinique Psychiatrique
> Unité INSERM 666
> 1 Place de l'Hôpital
> 67091 Strasbourg
% field_map_batch.m is a batch script that calculates a voxel displacement
% map (VDM) from field map data. It uses the Field Map Toolbox in SPM and
% the Siemens Verio 3T field map data acquired through a gradient echo
% (GRE) field sequence.
%
% All files need to be in the analyze or nifti format (.hdr, .img). The
% above sequence produces three files: 2 magnitude files (because of 2
% different echo times) and a phase difference file. All three files must
% be in the same directory.
%
% Please note, that even though the code explicitly asks for the EPI
% directory, no EPI unwarping will be performed.
%
% The default code uses the following directory structure. The first two
% files are the magnitude images and the second one is the phase difference
% image. The script will only take into account the first magnitude image.
% DATA_PATH
% |___ spm
% | |___subject1
% | | |___ field_map
% | | | |__sxxxxxxxxxx-0002-00001-000001-01.img
% | | | |__sxxxxxxxxxx-0002-00001-000001-02.img
% | | | |__sxxxxxxxxxx-0003-00001-000001-02.img
% | | |___ epi_dir
% | |___ subject2
% | |...
% |...
%
% To use this script, you will have to change the following:
% - Experiment folder
% - Subjects folders
% - Field map directory
% - EPI directory; here any dir where EPI files are located can be used
%
% It is advisable to run the script from the data_path.
%
% Glad Mihai, 08.11.2011
% [log in to unmask]
% You can use and change and pass on the script as much as you can. The only
% thing I ask is to keep the original author's name for credit purposes.
%% Experiment folder
data_path = 'E:\experiment\';
%% Subjects folders
subjects = {
'subject1',... % 1
'subject2',... % 2
'subject3' % 3
};
% field map directory
fm_dir = 'field_map';
% epi directory
epi_dir = 'epi_folder';
%% parameters used to calculate vdm
te1 = 4.92; % short TE
te2 = 7.38; % long TE
epifm = 0; % no epi-based field map, since GRE
tert = 11.56; % total epi read out time in ms, unimportant for this calculation
kdir = -1; % blip direction (+1/-1), unimportant for this calculation
mask = 0; % don't mask brain, done by default with a siemens field map
match = 0; % don't match field map to EPI
write_unw = 0; % don't write unwarped epi
%% field map calculation #1
for i = 1:numel(subjects)
% full path of field map
% needs to be adjusted if data not in 'spm' folder
FP_fm_dir = fullfile(data_path,subjects{i},'spm',fm_dir);
FP_epi_dir = fullfile(data_path,subjects{i},'spm',epi_dir);
VDM = FieldMap_preprocess(FP_fm_dir,FP_epi_dir, [te1, te2, epifm, tert, kdir, mask, match, write_unw] );
end
%% field map calculation #2 if necessary
% % field map directory
% fm_dir = '05_gre_field_7sli_betrag';
%
% % epi directory
% epi_dir = '07_TR0.5';
%
% for i = 1:numel(subjects)
%
% % full path of field map
% FP_fm_dir = fullfile(data_path,subjects{i},'spm',fm_dir);
% FP_epi_dir = fullfile(data_path,subjects{i},'spm',epi_dir);
%
% VDM = FieldMap_preprocess(FP_fm_dir,FP_epi_dir, [te1, te2, epifm, tert, kdir, mask] );
%
% end
|