Cloudmr-tools provides tools for advanced multi-coil reconstruction methods for Magnetic Resonance Imaging (MRI). Designed for researchers and developers in the field of MRI, this package supports streamlined implementation of reconstruction techniques like RSS, SENSE, and g factor calculation.
from cmtools.cm2D import cm2DReconB1,cm2DReconRSS,cm2DReconSENSE,cm2DGFactorSENSE
#S= your multi coil K-Space 2D signal
#N=your multi coil K-Space 2D noise or Noise covariance
L0=cm2DReconRSS()
L0.setSignalKSpace(S)
L0.setNoiseKSpace(N)
plt.figure()
plt.imshow(np.abs(L0.getOutput()))
plt.colorbar()
plt.title('RSS Reconstruction')#create an environment
python3 -m venv CMT
source CMT/bin/activate
pip install git+https://github.com/cloudmrhub/cloudmr-tools.git
Try our tools in your browser — no installation required:
If you use Cloudmr-tools in your research, please cite:
Montin E, Lattanzi R. Seeking a Widely Adoptable Practical Standard to Estimate Signal-to-Noise Ratio in Magnetic Resonance Imaging for Multiple-Coil Reconstructions. J Magn Reson Imaging. 2021 Dec;54(6):1952-1964. doi: 10.1002/jmri.27816. Epub 2021 Jul 4. PMID: 34219312; PMCID: PMC8633048.
The Cloudmr-tools package has two versions:
- Name:
cloudmrhub - Status: Deprecated, but still functional for backward compatibility. (v1 branch)
- Details: This version is no longer actively maintained and will not receive updates or bug fixes.
- Name:
cloudmr-tools - Status: Actively maintained (main branch).
- Details: This is the recommended version for new projects. It includes updated functionality and better support for advanced features.
| Feature | Version 1 (cloudmrhub) |
Version 2 (cloudmr-tools) |
|---|---|---|
| Maintenance | Deprecated | Actively maintained |
| Compatibility | Legacy projects | New and legacy projects |
| Features | Limited | Updated and expanded |
If you're currently using Version 1 of the library, consider migrating to Version 2 to take advantage of the latest features and updates.
If you need to continue using the Version 1 code, simply change the import path from cloudmrhub to cmtools. For example:
Original (Version 1):
import numpy as np
import cloudmrhub.cm2D as cm2DModified version (Version 2)
import numpy as np
import cmtools.cm2D as cm2DBelow is a high-level summary of the repository’s structure and functionality:
-
cmtools/cm.py
- Utilities for MRI data processing, including coil-sensitivity maps, GRAPPA recon, noise pre-whitening, and simpler SENSE-based reconstructions.
- Provides various classes for 2D/3D image data (e.g.,
i2d,k2d), helper functions (e.g.,getGRAPPAKspace,prewhiteningSignal), and logging/export support.
-
cmtools/espirit.py
- Implements ESPIRiT to generate coil-sensitivity maps using multi-channel k-space data.
- Core functions like
espirit(...)andespirit_proj(...)let you compute coil maps and project coil images onto the ESPIRiT operator space.
-
cmtools/version.py
- Simple script for printing package versions of dependencies.
-
cmtools/cfl.py
- Helper functions
readcflandwritecflto read/write BART.cfl/.hdrfiles.
- Helper functions
-
cmtools/cmaws.py
- Handles AWS S3 interactions: uploading/downloading of data, retrieving files, and credential management.
- Includes the
cmrOutputclass, which simplifies exporting and zipping results for local storage or S3 uploads.
-
tests.py and tests2.py
- Example scripts demonstrating how to run recon steps (using GRAPPA, SENSE, or custom coil-sensitivity methods).
- Show how to integrate with
cmtoolspipelines for quick testing and validation.
-
pyproject.toml
- Project metadata (e.g., name, version, build dependencies) and configuration for build tools.
Refer to individual script docstrings or the code itself for more information on each function’s parameters and usage.