Name | ssfp JSON |
Version |
1.2.0
JSON |
| download |
home_page | |
Summary | SSFP simulation |
upload_time | 2023-10-25 16:23:34 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | Copyright (c) 2023 Nicholas McKibben Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
SSFP
====
Simple steady-state free precession simulation. The goal is to
provide a simple to use, pip-installable solution for simulating and
working with this wonderful pulse sequence.
In this package:
- bSSFP: `bssfp()`
- FIMTRE: `fimtre()`
- GRE: `gre()`
- GS solution: `gs_recon()`
- PLANET: `planet()`
- 3D Region Growing Phase Correction: `rgphcorr3d()`
- Robust Coil Combination: `robustcc()`
Installation
============
Should be as easy as:
.. code-block:: bash
python -m pip install ssfp
Usage
=====
See `ssfp.examples` for typical usage. You can run examples like:
.. code-block:: bash
python -m ssfp.examples.basic_bssfp
Balanced steady-state free precession can be called through `bssfp()`.
This is an implementation of equations [1--2] in [1]_. These
equations are based on the Ernst-Anderson derivation [2]_ where
off-resonance is assumed to be subtracted as opposed to added (as in
the Freeman-Hill derivation [3]_). Hoff actually gets Mx and My
flipped in the paper, so we fix that here. We also assume that
the field map will be provided given the Freeman-Hill convention.
.. code-block:: python
from ssfp import bssfp
# Here's the simplest usage, see docstring for all the possible
# function arguments
sig = bssfp(T1, T2, TR, alpha)
We can also easily get the Geometric Solution to the elliptical
signal model as described in [1]_ as follows:
.. code-block:: python
from ssfp import gs_recon
recon = gs_recon(phased_cycled_images, pc_axis=-1)
# Notice that we can specify the axis where the phase-cycles live
PLANET [4]_ is a method for simultaneous T1, T2 fitting for bSSFP
phase-cycled data. Call like this:
.. code-block:: python
from ssfp import planet
# For a single pixel:
Meff, T1, T2, df = planet(
phased_cycled_pixels, alpha, TR, T1_guess,
pcs=np.deg2rad([0, 90, 180, 270, etc...]))
3D Region Growing Phase Correction [5]_ is an algorithm for
determining water and fat images from a single bSSFP acquisition.
It can be called like this:
.. code-block:: python
from ssfp import rgphcorr3d
phase_corrected = rgphcorr3d(
dataset3d, cellsize=(4, 4, 4), slice_axis=-1)
# see ssfp.examples.basic_rgphcorr for full usage example
Robust Coil Combination for bSSFP Elliptical Signal Model [6]_ is a
coil combination method that preserves the elliptical relationships
between phase-cycled pixels. It has two variants: simple and full.
By default, the simple method is called. The full method is very
slow and only used for validation of the simple method.
Robust coil combination can be called like this:
.. code-block:: python
from ssfp import robustcc
sx, sy, sz, num_pc, num_coils = data.shape[:]
coil_combined = robustcc(data, pc_axis=-2, coil_axis=-1)
# see ssfp.examples.basic_robustcc for more usage examples
Changelog
=========
- 1.2.0: setup.py -> pyproject.toml; GPL -> MIT licence; general maintenance;
dependency version bumps; type annotations; divide-by-zero fixes
- 1.0.0: `bssfp()` function overhaul to allow arbitrarily dimensioned
input arrays or scalars and removes the `target_pc_axis` argument.
References
==========
.. [1] Xiang, Qing‐San, and Michael N. Hoff. "Banding artifact
removal for bSSFP imaging with an elliptical signal
model." Magnetic resonance in medicine 71.3 (2014):
927-933.
.. [2] Ernst, Richard R., and Weston A. Anderson. "Application of
Fourier transform spectroscopy to magnetic resonance."
Review of Scientific Instruments 37.1 (1966): 93-102.
.. [3] Freeman R, Hill H. Phase and intensity anomalies in
fourier transform NMR. J Magn Reson 1971;4:366–383.
.. [4] Shcherbakova, Yulia, et al. "PLANET: an ellipse fitting
approach for simultaneous T1 and T2 mapping using
phase‐cycled balanced steady‐state free precession."
Magnetic resonance in medicine 79.2 (2018): 711-722.
.. [5] Hargreaves, Brian A., et al. "Fat‐suppressed steady‐state
free precession imaging using phase detection." Magnetic
Resonance in Medicine: An Official Journal of the
International Society for Magnetic Resonance in Medicine
50.1 (2003): 210-213.
.. [6] N. McKibben, G. Tarbox, E. DiBella, and N. K. Bangerter,
"Robust Coil Combination for bSSFP Elliptical Signal
Model," Proceedings of the 28th Annual Meeting of the
ISMRM; Sydney, NSW, Australia, 2020.
Raw data
{
"_id": null,
"home_page": "",
"name": "ssfp",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Nicholas McKibben <nicholas.bgp@gmail.com>",
"keywords": "",
"author": "",
"author_email": "Nicholas McKibben <nicholas.bgp@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/16/4c/2febcb7134cb90220fd33643405494961abcf4661104f0bae4971ed4ca8f/ssfp-1.2.0.tar.gz",
"platform": null,
"description": "SSFP\n====\n\nSimple steady-state free precession simulation. The goal is to\nprovide a simple to use, pip-installable solution for simulating and\nworking with this wonderful pulse sequence.\n\nIn this package:\n\n- bSSFP: `bssfp()`\n- FIMTRE: `fimtre()`\n- GRE: `gre()`\n- GS solution: `gs_recon()`\n- PLANET: `planet()`\n- 3D Region Growing Phase Correction: `rgphcorr3d()`\n- Robust Coil Combination: `robustcc()`\n\nInstallation\n============\n\nShould be as easy as:\n\n.. code-block:: bash\n\n python -m pip install ssfp\n\nUsage\n=====\n\nSee `ssfp.examples` for typical usage. You can run examples like:\n\n.. code-block:: bash\n\n python -m ssfp.examples.basic_bssfp\n\nBalanced steady-state free precession can be called through `bssfp()`.\nThis is an implementation of equations [1--2] in [1]_. These\nequations are based on the Ernst-Anderson derivation [2]_ where\noff-resonance is assumed to be subtracted as opposed to added (as in\nthe Freeman-Hill derivation [3]_). Hoff actually gets Mx and My\nflipped in the paper, so we fix that here. We also assume that\nthe field map will be provided given the Freeman-Hill convention.\n\n.. code-block:: python\n\n from ssfp import bssfp\n\n # Here's the simplest usage, see docstring for all the possible\n # function arguments\n sig = bssfp(T1, T2, TR, alpha)\n\nWe can also easily get the Geometric Solution to the elliptical\nsignal model as described in [1]_ as follows:\n\n.. code-block:: python\n\n from ssfp import gs_recon\n recon = gs_recon(phased_cycled_images, pc_axis=-1)\n\n # Notice that we can specify the axis where the phase-cycles live\n\nPLANET [4]_ is a method for simultaneous T1, T2 fitting for bSSFP\nphase-cycled data. Call like this:\n\n.. code-block:: python\n\n from ssfp import planet\n\n # For a single pixel:\n Meff, T1, T2, df = planet(\n phased_cycled_pixels, alpha, TR, T1_guess,\n pcs=np.deg2rad([0, 90, 180, 270, etc...]))\n\n3D Region Growing Phase Correction [5]_ is an algorithm for\ndetermining water and fat images from a single bSSFP acquisition.\nIt can be called like this:\n\n.. code-block:: python\n\n from ssfp import rgphcorr3d\n phase_corrected = rgphcorr3d(\n dataset3d, cellsize=(4, 4, 4), slice_axis=-1)\n\n # see ssfp.examples.basic_rgphcorr for full usage example\n\nRobust Coil Combination for bSSFP Elliptical Signal Model [6]_ is a\ncoil combination method that preserves the elliptical relationships\nbetween phase-cycled pixels. It has two variants: simple and full.\nBy default, the simple method is called. The full method is very\nslow and only used for validation of the simple method.\nRobust coil combination can be called like this:\n\n.. code-block:: python\n\n from ssfp import robustcc\n\n sx, sy, sz, num_pc, num_coils = data.shape[:]\n coil_combined = robustcc(data, pc_axis=-2, coil_axis=-1)\n\n # see ssfp.examples.basic_robustcc for more usage examples\n\nChangelog\n=========\n\n- 1.2.0: setup.py -> pyproject.toml; GPL -> MIT licence; general maintenance;\n dependency version bumps; type annotations; divide-by-zero fixes\n- 1.0.0: `bssfp()` function overhaul to allow arbitrarily dimensioned\n input arrays or scalars and removes the `target_pc_axis` argument.\n\nReferences\n==========\n.. [1] Xiang, Qing\u2010San, and Michael N. Hoff. \"Banding artifact\n removal for bSSFP imaging with an elliptical signal\n model.\" Magnetic resonance in medicine 71.3 (2014):\n 927-933.\n.. [2] Ernst, Richard R., and Weston A. Anderson. \"Application of\n Fourier transform spectroscopy to magnetic resonance.\"\n Review of Scientific Instruments 37.1 (1966): 93-102.\n.. [3] Freeman R, Hill H. Phase and intensity anomalies in\n fourier transform NMR. J Magn Reson 1971;4:366\u2013383.\n.. [4] Shcherbakova, Yulia, et al. \"PLANET: an ellipse fitting\n approach for simultaneous T1 and T2 mapping using\n phase\u2010cycled balanced steady\u2010state free precession.\"\n Magnetic resonance in medicine 79.2 (2018): 711-722.\n.. [5] Hargreaves, Brian A., et al. \"Fat\u2010suppressed steady\u2010state\n free precession imaging using phase detection.\" Magnetic\n Resonance in Medicine: An Official Journal of the\n International Society for Magnetic Resonance in Medicine\n 50.1 (2003): 210-213.\n.. [6] N. McKibben, G. Tarbox, E. DiBella, and N. K. Bangerter,\n \"Robust Coil Combination for bSSFP Elliptical Signal\n Model,\" Proceedings of the 28th Annual Meeting of the\n ISMRM; Sydney, NSW, Australia, 2020.\n",
"bugtrack_url": null,
"license": "Copyright (c) 2023 Nicholas McKibben Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "SSFP simulation",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/mckib2/ssfp"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d80009f985bf843c6332c48b426a889a9de48de5998925c0505d6d6166d2ea46",
"md5": "353cf67a96c65bafa92faee15af7173e",
"sha256": "18dadb3979c708bbefaef08cb62b2da63b1925cf22bcdf3c3849b0b58cfc18db"
},
"downloads": -1,
"filename": "ssfp-1.2.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "353cf67a96c65bafa92faee15af7173e",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 41798,
"upload_time": "2023-10-25T16:23:33",
"upload_time_iso_8601": "2023-10-25T16:23:33.031899Z",
"url": "https://files.pythonhosted.org/packages/d8/00/09f985bf843c6332c48b426a889a9de48de5998925c0505d6d6166d2ea46/ssfp-1.2.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "164c2febcb7134cb90220fd33643405494961abcf4661104f0bae4971ed4ca8f",
"md5": "e27f77bfbd4e1f85e6f43aa11c071893",
"sha256": "77c26f280de44a54800616360150a783055f037b19f1b3fe09fb3738d7657062"
},
"downloads": -1,
"filename": "ssfp-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e27f77bfbd4e1f85e6f43aa11c071893",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 33512,
"upload_time": "2023-10-25T16:23:34",
"upload_time_iso_8601": "2023-10-25T16:23:34.835513Z",
"url": "https://files.pythonhosted.org/packages/16/4c/2febcb7134cb90220fd33643405494961abcf4661104f0bae4971ed4ca8f/ssfp-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-25 16:23:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mckib2",
"github_project": "ssfp",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ssfp"
}