Skip to content

Commit

Permalink
fix bug for imcompartible B0 direction between SEPIA and LPCNN
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwok-Shing Chan committed Oct 9, 2023
1 parent 9083249 commit 2937400
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions addons/bfr/BFRnet/setup_BFRnet_environment.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
%% This file specifies the Checkpoint of xQSM

% Specify the directory of the xQSM code from Github
deepMRI_HOME = '/project/3015069.05/bids/code/deepMRI/';
deepMRI_HOME = '/home/common/matlab/sepia/external/deepMRI/';
% If you have your own trained network, specify the file that contains the trained parameters
% otherwise, uses the one provided with the tool
checkpoints = '/project/3015069.05/bids/code/deepMRI/BFRNet_data/checkpoints/BFRnet_L2_64PS_24BS_45Epo_NewHCmix.mat';
checkpoints = '/home/common/matlab/sepia/external/deepMRI/BFRNet_data/checkpoints/BFRnet_L2_64PS_24BS_45Epo_NewHCmix.mat';

2 changes: 2 additions & 0 deletions addons/qsm/LPCNN/Wrapper_QSM_LPCNN.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
mask_pad = mask;
end

% 20231009: fix mismatch of B0dir between SEPIA and LPCNN
b0dir = [b0dir(2), -b0dir(1), b0dir(3)];

[C,~] = DipoleKernel(size(localField_pad),voxelSize,b0dir);

Expand Down
4 changes: 2 additions & 2 deletions addons/qsm/LPCNN/setup_LPCNN_environment.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
% dir_net = fullfile(qsmnet_dir,'Checkpoints/');

% Specify LPCNN_HOME corresponding to the code from Github
LPCNN_HOME = '/project/3015069.05/bids/code/LPCNN/';
LPCNN_HOME = '/home/common/matlab/sepia/external/LPCNN/LPCNN_v1.0';
% Specify the Python environment that has QSMnet+ installed
python_interpreter = '/project/3015069.05/bids/code/LPCNN/lpcnn-env/bin/python';
python_interpreter = '/home/common/matlab/sepia/external/LPCNN/LPCNN_v1.0/lpcnn-env/bin/python';
% Specify the directory that contains the training parameters
checkpoint_fn = fullfile(LPCNN_HOME,'checkpoints','lpcnn_test_Bmodel.pkl');
% checkpoint_fn = '/project/3015069.05/bids/code/LPCNN/checkpoints/lpcnn_test_Bmodel.pkl';
Expand Down
4 changes: 2 additions & 2 deletions addons/qsm/QSMnet/setup_qsmnet_environment.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
%% This file specifies the Python environment and Checkpoint of QSMnet+

% Specify the directory of the QSMnet+ code from Github
QSMnet_HOME = '/project/3015069.05/bids/code/QSMnet/';
QSMnet_HOME = '/home/common/matlab/sepia/external/QSMnet/QSMnet-9ca283a';
% Specify the Python environment that has QSMnet+ installed
python_interpreter = '/project/3015069.05/bids/code/QSMnet/qsmnet/bin/python';
python_interpreter = '/home/common/matlab/sepia/external/QSMnet/QSMnet-9ca283a/qsmnet/bin/python';
% Specify the directory that contains the trained parameters
dir_net = fullfile(QSMnet_HOME,'Checkpoints/');
2 changes: 1 addition & 1 deletion addons/qsm/xQSM/setup_xQSM_environment.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% This file specifies the Checkpoint of xQSM

% Specify the directory of the xQSM code from Github
deepMRI_HOME = '/project/3015069.05/bids/code/deepMRI/';
deepMRI_HOME = '/home/common/matlab/sepia/external/deepMRI/';
% If you have your own trained network, specify the file that contains the trained parameters
% otherwise, uses the one provided with the tool
checkpoint_dir = fullfile(deepMRI_HOME, 'xQSM_data','checkpoints');
Expand Down
1 change: 1 addition & 0 deletions sepia.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
% Date modified: 12 June 2021 (v1.0)
% Date modified: 3 August 2022 (v1.1)
% Date modified: 3 April 2023 (v1.2.2.4)
% Date modified: 9 October 2023 (v1.2.2.5)
%
function sepia

Expand Down
2 changes: 1 addition & 1 deletion sepia_universal_variables.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
% DO NOT change the order of the entities, add a new one at the end instead
%
%% Version
SEPIA_version = 'v1.2.2.4';
SEPIA_version = 'v1.2.2.5';

%% PATH
SEPIA_HOME = fileparts(mfilename('fullpath'));
Expand Down

0 comments on commit 2937400

Please sign in to comment.