Skip to main content

Package to process (sh)MOLLI MRI data

Project description

# Process MOLLI and shMOLLI data

Reads a directory of shMOLLI DICOM images and processes the data to produce a look-locker corrected T1 map. Negative values are cropped to 0.

Two possible methods for processing the data are available.

  1. Fast (default). Uses some numerical methods to solve exponential equations of the correct form. May be slightly less accurate, but significantly faster.

  2. Slow. Uses scipy curve fitting algorithm to fit the exponential curve. More accurate, but much slower.

The difference between the two methods is very little as demonstrated in the figure below.

![fast_slow comparison](fast_slow.tif “Comparison of fast and slow fitting methods”)

Any pixels/voxels where the max value is less than 100 is skipped. NB: For this version, data is processed top-left to bottom-right in the image. As images are often empty around the edges, this means the the processing is ‘fast’ to start with as each pixel is basically skipped, then slows down as the true data is processed, then speeds up again at the end.

## Usage

As module `python > pip3 install sh_molli > process_sh_molli_series.py -i <inputfolder> -o <outputfilename> -p <plot_flag> -m <method> `

In code `python > python3 > import sh_molli.sh_molli as sh > im = sh.process_folder(dir,method='fast') `

-i - input folder must be a path containing DICOM images only Can process data based on ‘Inversion Time’ being stored in dcm.TriggerTime, dcm.InversionTime and dcm.ImageComments

-o - output file name. Uses PIL for image writing, so supports all formats that PIL understands. Recommended using example.tiff to ensure that large values are not cropped

-p - plot flat (1, 0 or not present). If 1, the image will be displayed using matplotlib once the data is processed. Colorbar is cropped to 0-2000 range, sensible values for human tissue.

-m - method. (‘fast’ or ‘slow’). See above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sh_molli-0.0.55.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sh_molli-0.0.55-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file sh_molli-0.0.55.tar.gz.

File metadata

  • Download URL: sh_molli-0.0.55.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for sh_molli-0.0.55.tar.gz
Algorithm Hash digest
SHA256 7993ce0962d7ab0451d28f0b381daf2fb9a1171f97c46fed4a20df3419d9c123
MD5 c57beda197b20df3797cb6213d453aba
BLAKE2b-256 4a8071e91989a2dfa8e02d86df6976d0db0e8660ad41416d1e1b8e5074a0c7a8

See more details on using hashes here.

File details

Details for the file sh_molli-0.0.55-py3-none-any.whl.

File metadata

  • Download URL: sh_molli-0.0.55-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for sh_molli-0.0.55-py3-none-any.whl
Algorithm Hash digest
SHA256 7151e636ae39a64d0ac911b2d33f9117fb28d7cec7284d7e2834ed2a61631436
MD5 6b71ce453f9b3bb2dc418a8cd28d735d
BLAKE2b-256 b7cd0799b112f465be257ec15103710bbc84d0b467d4c0780071eb64fa4491ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page