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

Add Density Compensation Algorithms #2

Closed
paquiteau opened this issue Feb 19, 2023 · 1 comment
Closed

Add Density Compensation Algorithms #2

paquiteau opened this issue Feb 19, 2023 · 1 comment
Labels
feature request New feature or request

Comments

@paquiteau
Copy link
Member

The density compensation vector can be estimated using several methods:

  • Pipe et al. (Fixed point method)
  • Voronoi Cell area
  • ...

A good list of methods is provided by Jeff Fessler: https://web.eecs.umich.edu/~fessler/book/c-four.pdf , section 6.4.2

@paquiteau paquiteau added the feature request New feature or request label Feb 19, 2023
@paquiteau
Copy link
Member Author

There are some support for density now, using the fork (https://github.com/chaithyagr/finufft), and hopefully will be merged in flatironinstitute/finufft#308

mcencini added a commit to mcencini/mri-nufft that referenced this issue Sep 2, 2024
paquiteau pushed a commit that referenced this issue Sep 17, 2024
* fix typoes (off_resonnance -> off_resonance)

* feat: add field interpolators calculation (#124)

This add "get_interpolators_from_fieldmap", supporting both real (B0 map only) and complex (Zmap = R2* + 1j * B0map) fields
in arbitrary dimension (2D and 3D). The routine supports both numpy / cupy arrays and torch tensors on CPU and GPU,
the latter requiring cupy due to limitations in torch.histogram / torch.histogramdd (pytorch/pytorch#69519).

Calculation uses time segmentation with uniform time samples and LS coefficients (using histogram).

Based on MIRT (https://github.com/JeffFessler/mirt/blob/main/mri/mri_exp_approx.m)
and its Python porting from MIRTORCH (https://github.com/guanhuaw/MIRTorch/blob/master/mirtorch/linear/mri.py)
and SigPy (https://github.com/mikgroup/sigpy/blob/main/sigpy/mri/util.py).

* feat: field interpolator estimation in MRIFourierCorrected constructor.

In addition, add off-resonance example.

* feat: set autograd_available based on base FourierOperator

* Update test_offres_exp_approx.py

Avoid torch cuda test case if cupy is not available.

* Update src/mrinufft/operators/off_resonance.py

remove deprecated get_grad

Co-authored-by: Chaithya G R <[email protected]>

* address pr review

* remove phantominator

* remove duplicated example and replacing subject in example_offres

* address PR rev #2

* \!docs_build and fix on \!style

* \!docs_build

* skip field coefficient gpu test case if cupy not available

* \!docs_build fix gpuNUFFT

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* \!docs_build gpunufft

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* address PR rev 3

* Update pyproject.toml

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* \![docs_build]

* temp, \![docs_build] fix

* fix cufinufft, \!docs_build fix

---------

Co-authored-by: Chaithya G R <[email protected]>
Co-authored-by: Guillaume Daval-Frérot <[email protected]>
paquiteau added a commit that referenced this issue Sep 30, 2024
* fix typoes (off_resonnance -> off_resonance)

* feat: add field interpolators calculation (#124)

This add "get_interpolators_from_fieldmap", supporting both real (B0 map only) and complex (Zmap = R2* + 1j * B0map) fields
in arbitrary dimension (2D and 3D). The routine supports both numpy / cupy arrays and torch tensors on CPU and GPU,
the latter requiring cupy due to limitations in torch.histogram / torch.histogramdd (pytorch/pytorch#69519).

Calculation uses time segmentation with uniform time samples and LS coefficients (using histogram).

Based on MIRT (https://github.com/JeffFessler/mirt/blob/main/mri/mri_exp_approx.m)
and its Python porting from MIRTORCH (https://github.com/guanhuaw/MIRTorch/blob/master/mirtorch/linear/mri.py)
and SigPy (https://github.com/mikgroup/sigpy/blob/main/sigpy/mri/util.py).

* feat: field interpolator estimation in MRIFourierCorrected constructor.

In addition, add off-resonance example.

* feat: set autograd_available based on base FourierOperator

* Update test_offres_exp_approx.py

Avoid torch cuda test case if cupy is not available.

* Update src/mrinufft/operators/off_resonance.py

remove deprecated get_grad

Co-authored-by: Chaithya G R <[email protected]>

* address pr review

* remove phantominator

* remove duplicated example and replacing subject in example_offres

* address PR rev #2

* \!docs_build and fix on \!style

* \!docs_build

* enhancement: refactor with_* decorator to support standalone functions.

* skip field coefficient gpu test case if cupy not available

* \!docs_build fix gpuNUFFT

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* \!docs_build gpunufft

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* Update src/mrinufft/operators/off_resonance.py

Co-authored-by: Guillaume Daval-Frérot <[email protected]>

* address PR rev 3

* sync with off_resonance PR rev

* feat: handle kwargs only input.

* fix: decorators now working if required_grad is True

* sync with master

* Update src/mrinufft/operators/base.py

Co-authored-by: Pierre-Antoine Comby <[email protected]>

* refactor: array interface conversion in separate module.

* lint tfnufft

* remove print statements

* Update src/mrinufft/_array_compat.py

Co-authored-by: Pierre-Antoine Comby <[email protected]>

* Update src/mrinufft/_array_compat.py

Co-authored-by: Pierre-Antoine Comby <[email protected]>

* Update src/mrinufft/_array_compat.py

Co-authored-by: Pierre-Antoine Comby <[email protected]>

* enhance: handle kwargs and (nested) tuple/lists of arraylike arguments.

* update base.py

* Update src/mrinufft/_array_compat.py

Co-authored-by: Pierre-Antoine Comby <[email protected]>

* apply suggested refactor to each decorator.

---------

Co-authored-by: Chaithya G R <[email protected]>
Co-authored-by: Guillaume Daval-Frérot <[email protected]>
Co-authored-by: Pierre-Antoine Comby <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant