{ "info": { "author": "Oliver Maier", "author_email": "oliver.maier@tugraz.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "# PyQMRI - Model-Based Parameter Quantification\n\n* Requires [OpenCL](https://www.khronos.org/opencl/) >= 1.2\n* Requires [clfft](https://github.com/clMathLibraries/clFFT)\n* Requires [gpyfft](https://github.com/geggo/gpyfft)\n* Requires Cython, pip >= 19, python >= 3.6\n\nThe Software is tested on Linux using the latest Nvidia driver (418.56 CUDA Version: 10.1) but should be compatible with older drivers as well as different hardware (AMD). The following Installation Guide is targeted at Ubuntu but should work on any distribution provided the required packages are present (could be differently named).\n\n* It is highly recommended to use an Anaconda environment\n\nQuick Installing Guide:\n---------------\nFirst make sure that you have a working OpenCL installation\n - OpenCL is usually shipped with GPU driver (Nvidia/AMD)\n - Install the ocl_icd and the OpenCL-Headers\n ```\n apt-get install ocl_icd* opencl-headers\n ``` \nPossible restart of system after installing new drivers\n - Build [clinfo](https://github.com/Oblomov/clinfo)\n - Run clinfo in terminal and check for errors\n\nInstall clFFT library: \n - Either use the package repository,e.g.:\n ```\n apt-get install libclfft*\n ``` \n - Or download a prebuild binary of [clfft](https://github.com/clMathLibraries/clFFT) \n - Please refer to the [clFFT](https://github.com/clMathLibraries/clFFT) docs regarding building\n - If build from source symlink clfft libraries from lib64 to the lib folder and run ``` ldconfig ```\n\n - Install [gpyfft](https://github.com/geggo/gpyfft) by following the instruction on the GitHub page. \n\n - A simple\n ```\n pip install pyqmri\n ```\n should be sufficient to install the latest release.\n\n - Alternatively, clone the git repository and navigate to the root directory of PyQMRI. Typing\n ```\n pip install .\n ```\n should take care of the other dependencies using PyPI and install the package. \n\n\nIn case OCL > 1.2 is present, e.g. by some CPU driver, and NVidia GPUs needs to be used the flag\nPRETENED_OCL 1.2 has to be passed to PyOpenCL during the build process. This \ncan be done by:\n```\n./configure.py --cl-pretend-version=1.2\nrm -Rf build\npython setup.py install\n```\n\n## Sample Data\n\nIn-vivo datasets used in the original publication (doi: [10.1002/mrm.27502](http://onlinelibrary.wiley.com/doi/10.1002/mrm.27502/full)) can be found at \n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1410918.svg)](https://doi.org/10.5281/zenodo.1410918) \n\nPrerequests on the .h5 file:\n-------------------------\nThe toolbox expects a .h5 file with a certain structure. \n - kspace data (assumed to be 5D for VFA) and passed as:\n - real_dat (Scans, Coils, Slices, Projections, Samples)\n - imag_dat (Scans, Coils, Slices, Projections, Samples)\n\n If radial sampling is used the trajectory is expected to be:\n - real_traj (Scans, Projections, Samples)\n - imag_traj (Scans, Projections, Samples)\n\n Density compensation is performed internally assuming a simple ramp\n\n For Cartesian data Projections and Samples are replaced by ky and kx encodings points and no trajectory is needed. \n\n Data is assumed to be 2D stack-of-stars, i.e. already Fourier transformed along the fully sampled z-direction.\n\n - flip angle correction (optional) can be passed as:\n - fa_corr (Scans, Coils, Slices, dimY, dimX)\n - The image dimension for the full dataset is passed as attribute consiting of:\n - image_dimensions = (dimX, dimY, NSlice)\n - Parameters specific to the used model (e.g. TR or flip angle) need to be set as attributes e.g.:\n - TR = 5.38\n - flip_angle(s) = (1,3,5,7,9,11,13,15,17,19)\n\n The specific structure is determined according to the Model file.\n\n If predetermined coil sensitivity maps are available they can be passed as complex dataset, which can saved bedirectly using Python. Matlab users would need to write/use low level hdf5 functions to save a complex array to .h5 file. Coil sensitivities are assumed to have the same number of slices as the original volume and are intesity normalized. The corresponding .h5 entry is named \"Coils\". If no \"Coils\" parameter is found or the number of \"Coil\" slices is less than the number of reconstructed slices, the coil sensitivities are determined using the [NLINV](https://doi.org/10.1002/mrm.21691) algorithm and saved into the file. \n\nRunning the reconstruction:\n------------------------- \nFirst, start an ipcluster for speeding up the coil sensitivity estimation:\n```\nipcluster start -n N\n```\nwhere N amounts to the number of processe to be used. If -n N is ommited, \nas many processes as number of CPU cores available are started.\n\nReconstruction of the parameter maps can be started either using the terminal by typing:\n```\npyqmri\n```\nor from python by:\n```\nimport pyqmri\npyqmri.run()\n```\nA list of accepted flags can be printed using \n```\npyqmri -h\n```\n\nor by fewing the documentation of pyqmri.pyqmri in python.\n\nIf reconstructing fewer slices from the volume than acquired, slices will be picked symmetrically from the center of the volume. E.g. reconstructing only a single slice will reconstruct the center slice of the volume. \n\nThe config file (\\*.ini):\n------------------------- \nA default config file will be generated if no path to a config file is passed as an argument or if no default.ini file is present in the current working directory. After the initial generation the values can be altered to influence regularization or the number of iterations. Seperate values for TV and TGV regularization can be used. \n\n - max_iters: Maximum primal-dual (PD) iterations\n - start_iters: PD iterations in the first Gauss-Newton step\n - max_gn_it: Maximum number of Gauss Newton iterations\n - lambd: Data weighting\n - gamma: TGV weighting\n - delta: L2-step-penalty weighting (inversely weighted)\n - omega: optional H1 regularization (should be set to 0 if no H1 is used)\n - display_iterations: Flag for displaying grafical output\n - gamma_min: Minimum TGV weighting\n - delta_max: Maximum L2-step-penalty weighting\n - omega_min: Minimum H1 weighting (should be set to 0 if no H1 is used)\n - tol: relative convergence toleranze for PD and Gauss-Newton iterations\n - stag: optional stagnation detection between successive PD steps\n - delta_inc: Increase factor for delta after each GN step\n - gamma_dec: Decrease factor for gamma after each GN step\n - omega_dec: Decrease factor for omega after each GN step\n\nLimitations and known Issues:\n-------------------------\nCurrently runs only on GPUs due to having only basic CPU support for the clfft.\n\nCitation:\n----------\nPlease cite \"Oliver Maier, Matthias Schloegl, Kristian Bredies, and Rudolf Stollberger; 3D Model-Based Parameter Quantification on Resource Constrained Hardware using Double-Buffering. Proceedings of the 27th meeting of the ISMRM, 2019, Montreal, Canada\" if using the software or parts of it, specifically the PyOpenCL based NUFFT, in your work.\n\nOlder Releases:\n---------\nYou can find the code for \n\nMaier O, Schoormans J,Schloegl M, Strijkers GJ, Lesch A, Benkert T, Block T, Coolen BF, Bredies K, Stollberger R
\n __Rapid T1 quantification from high\nresolution 3D data with model\u2010based reconstruction.__
\n _Magn Reson Med._, 2018; 00:1\u201316
\n doi: [10.1002/mrm.27502](http://onlinelibrary.wiley.com/doi/10.1002/mrm.27502/full)\n\nat [v0.1.0](https://github.com/IMTtugraz/PyQMRI/tree/v.0.1.0)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/IMTtugraz/PyQMRI/archive/v.0.2.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/IMTtugraz/PyQMRI", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "pyqmri", "package_url": "https://pypi.org/project/pyqmri/", "platform": "", "project_url": "https://pypi.org/project/pyqmri/", "project_urls": { "Download": "https://github.com/IMTtugraz/PyQMRI/archive/v.0.2.1.tar.gz", "Homepage": "https://github.com/IMTtugraz/PyQMRI" }, "release_url": "https://pypi.org/project/pyqmri/0.2.1/", "requires_dist": [ "cython", "pyopencl", "numpy", "h5py", "mako", "matplotlib", "ipyparallel", "pyfftw", "pyqt5" ], "requires_python": ">=3.6", "summary": "Model-based parameter quantification using OpenCL and Python", "version": "0.2.1" }, "last_serial": 5606267, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "f226046b7cb05623794b5cd9dc906504", "sha256": "61b70b8ca8c27432699c485ab66c82583d188c42416362fd38ef018e27104401" }, "downloads": -1, "filename": "pyqmri-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f226046b7cb05623794b5cd9dc906504", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 67553, "upload_time": "2019-07-30T07:43:25", "url": "https://files.pythonhosted.org/packages/73/bc/2aa1aae38c8dd016eefab9b7a15ff9011aeff257c02ed751af957226b916/pyqmri-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "163d4bb59383324595d0e7a3b528d686", "sha256": "51efce2383feed265b5c33d529a226050e30a8cef93fb03bd7e1c7c6e5b0b99b" }, "downloads": -1, "filename": "pyqmri-0.2.1.tar.gz", "has_sig": false, "md5_digest": "163d4bb59383324595d0e7a3b528d686", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 48440, "upload_time": "2019-07-30T07:43:28", "url": "https://files.pythonhosted.org/packages/e8/48/96e46ce6af676d91ebcd3d41fb4513d5d95eaa73350fa8e93d946387c7dd/pyqmri-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f226046b7cb05623794b5cd9dc906504", "sha256": "61b70b8ca8c27432699c485ab66c82583d188c42416362fd38ef018e27104401" }, "downloads": -1, "filename": "pyqmri-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f226046b7cb05623794b5cd9dc906504", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 67553, "upload_time": "2019-07-30T07:43:25", "url": "https://files.pythonhosted.org/packages/73/bc/2aa1aae38c8dd016eefab9b7a15ff9011aeff257c02ed751af957226b916/pyqmri-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "163d4bb59383324595d0e7a3b528d686", "sha256": "51efce2383feed265b5c33d529a226050e30a8cef93fb03bd7e1c7c6e5b0b99b" }, "downloads": -1, "filename": "pyqmri-0.2.1.tar.gz", "has_sig": false, "md5_digest": "163d4bb59383324595d0e7a3b528d686", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 48440, "upload_time": "2019-07-30T07:43:28", "url": "https://files.pythonhosted.org/packages/e8/48/96e46ce6af676d91ebcd3d41fb4513d5d95eaa73350fa8e93d946387c7dd/pyqmri-0.2.1.tar.gz" } ] }