Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Adding b-tensor encoding scripts like compute_fodf/frf and metrics #425

Merged
merged 80 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift click to select a range
d56e04a
Adding b-tensor encoding scripts
Mar 2, 2021
8e5720e
Adding uFA clip
Mar 8, 2021
9c6a2a1
WIP
Mar 13, 2021
5eb8464
WIP
May 18, 2021
eadafe8
multi_processes merge fix
May 27, 2021
822c5a7
Merge branch 'master' of https://github.com/scilus/scilpy into memsmt…
May 27, 2021
95a070b
multi_processes merge fix
May 27, 2021
02a4caf
cleaning frf script
May 27, 2021
3ed34a3
Cleaning generate btens input
May 27, 2021
cd96e5e
Cleaning memsmt_fodf
May 27, 2021
222a9a5
Cleaning memsmt_fodf
May 27, 2021
bc6ffb5
Adding doc and cleaning
May 31, 2021
67a39df
pep8 fixes
May 31, 2021
9fab750
Fixes to frf and fodf
May 31, 2021
5b6e83d
fixes
May 31, 2021
9a735cc
Changing default values
Jun 1, 2021
8942942
Merge with master (adding convert_sh_to_sf)
Jun 1, 2021
581a92f
Adding test scripts
Jun 1, 2021
b41ad61
Fixing merge conflicts
Sep 9, 2021
ce78986
Fixing tests
Sep 9, 2021
18b63d9
Fixing tests
Sep 9, 2021
1ace6f4
Fixing tests
Sep 10, 2021
8f32448
Fixing doc frf.py
Sep 10, 2021
ccd7daa
Adding doc to multi_processes.py and divide_fit.py
Sep 10, 2021
897c734
Adding more doc to divide_fit.py
Sep 10, 2021
835dd20
Removing spaces
Sep 10, 2021
0ba55a8
Fixing pep8.
Sep 15, 2021
7da9f51
Fixinx pep8.
Sep 15, 2021
3d48f0d
Fixing pep8
Sep 16, 2021
b1408b8
WIP
Sep 17, 2021
a900e98
Change import for extract_affine
Sep 17, 2021
a405aaa
Fixing affine
Sep 17, 2021
119af11
WIP: redo of b_tensor_utils
Sep 21, 2021
db3ca48
WIP: Cleaning b_tensor_utils
Sep 22, 2021
5ee3a75
Fixing pep8
Sep 22, 2021
81a143d
Fixing bug with b0
Sep 23, 2021
564af0c
Adding doc
Sep 23, 2021
99c4e86
Adding P. Karan paper as ref
Sep 29, 2021
9631542
Adding doc about minimal input data requirements
Sep 29, 2021
bab8097
Adding check up for number of b-tensors
Sep 30, 2021
e0a991e
Changing the way b-tensor input is given
Oct 5, 2021
bf4b808
Adding test data to fetcher
Oct 5, 2021
6f83be7
Updating compute_divide test
Oct 5, 2021
5e3f16f
Updating all tests.
Oct 5, 2021
d11ef4c
Addressing small comments
Oct 27, 2021
e322aa8
Fixing pep8
karanphil Oct 27, 2021
2013e17
Adding verbose and fixing divide by 0
karanphil Oct 29, 2021
4195ba2
Remove fix for divide by 0
karanphil Oct 29, 2021
fe40fcb
Adding verbose to ssst_fodf
karanphil Oct 29, 2021
70af88e
Investigating bug
karanphil Nov 2, 2021
536c4fb
WIP
Feb 14, 2022
a10aea5
removing redo_weight_bvals
Mar 16, 2022
a452451
merging master
Mar 16, 2022
0aee9af
Small fix with redo_weight_bval
Mar 16, 2022
f3f92c6
Adding .rst documentation
Mar 16, 2022
a52f7a1
WIP
Apr 21, 2022
323d1d9
Merge branch 'master' of https://github.com/scilus/scilpy into memsmt…
Jun 30, 2022
ef79fe9
Fixing conflict
Sep 22, 2022
c840e33
WIP
Dec 8, 2022
1ae1947
Merging with master
karanphil Mar 6, 2023
858f6c1
Fixing extract_affine
karanphil Mar 6, 2023
0fd3cc1
Removing the error check from fit_from_model_parallel
Mar 8, 2023
ca611bc
Restoring msmt
Mar 8, 2023
acdc0b1
Update doc
Mar 8, 2023
e3480c9
Fixing source docs
Mar 8, 2023
18af35e
Merge branch 'master' of github.com:karanphil/scilpy into memsmt_csd
Mar 8, 2023
3e24459
Adding hot_dipy to requirements
Mar 8, 2023
3e0d312
Fixing small typo
Mar 8, 2023
5e3aa38
Fixing tests
Mar 8, 2023
aeca4cc
Adding hot_dipy to requirements
Mar 8, 2023
376093c
Fixing requirements
Mar 8, 2023
cfc1926
Requirements
Mar 8, 2023
ac739fe
Requirements
Mar 8, 2023
b01c5c1
Adding doc about b_delta
Mar 9, 2023
144d9e8
Merge branch 'master' of github.com:karanphil/scilpy into memsmt_csd
Mar 9, 2023
2e22c92
Merge
karanphil Mar 12, 2023
289d947
Merge branch 'memsmt_csd' of github.com:karanphil/scilpy into memsmt_csd
Mar 14, 2023
1220b41
Adding doc to btensor_scripts.rst
karanphil Mar 16, 2023
bac1d66
Fixing frf help
karanphil Mar 16, 2023
09fa0c0
Merge
karanphil Mar 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleaning frf script
  • Loading branch information
Philippe Karan authored and Philippe Karan committed May 27, 2021
commit 02a4cafd5dce2f40739aea77cbc77b5d1943f22f
17 changes: 9 additions & 8 deletions scilpy/reconst/frf.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 132,13 @@ def compute_ssst_frf(data, bvals, bvecs, mask=None, mask_wm=None,
return full_response


def compute_msmt_frf(data, bvals, bvecs, data_dti=None, bvals_dti=None,
bvecs_dti=None, mask=None, mask_wm=None, mask_gm=None,
mask_csf=None, fa_thr_wm=0.7, fa_thr_gm=0.2,
fa_thr_csf=0.1, md_thr_gm=0.0007, md_thr_csf=0.003,
min_nvox=300, roi_radii=10, roi_center=None,
tol=20, force_b0_threshold=False):
def compute_msmt_frf(data, bvals, bvecs, btens=None, data_dti=None,
bvals_dti=None, bvecs_dti=None, btens_dti=None,
mask=None, mask_wm=None, mask_gm=None, mask_csf=None,
fa_thr_wm=0.7, fa_thr_gm=0.2, fa_thr_csf=0.1,
md_thr_gm=0.0007, md_thr_csf=0.003, min_nvox=300,
roi_radii=10, roi_center=None, tol=20,
force_b0_threshold=False):
"""Compute a single-shell (under b=1500), single-tissue single Fiber
Response Function from a DWI volume.
A DTI fit is made, and voxels containing a single fiber population are
Expand Down Expand Up @@ -222,7 223,7 @@ def compute_msmt_frf(data, bvals, bvecs, data_dti=None, bvals_dti=None,

check_b0_threshold(force_b0_threshold, bvals.min())

gtab = gradient_table(bvals, bvecs)
gtab = gradient_table(bvals, bvecs, btens=btens)

if data_dti is None and bvals_dti is None and bvecs_dti is None:
logging.warning(
Expand All @@ -243,7 244,7 @@ def compute_msmt_frf(data, bvals, bvecs, data_dti=None, bvals_dti=None,
bvecs_dti = normalize_bvecs(bvecs_dti)

check_b0_threshold(force_b0_threshold, bvals_dti.min())
gtab_dti = gradient_table(bvals_dti, bvecs_dti)
gtab_dti = gradient_table(bvals_dti, bvecs_dti, btens=btens_dti)

wm_frf_mask, gm_frf_mask, csf_frf_mask \
= mask_for_response_msmt(gtab_dti, data_dti,
Expand Down
Loading