Package: ugad4fun
Gadgetron Cases of Medical Images ReconstructionUGadget: A python library, providing some mri reconstruction cases, based on Gadgetron frameworkIntroductionUGadget is an application-level library, containing some cases, based on Gadgetron framework, to do reconstruction on MRI images.Prerequisiteclone gadgetron to your workspacegitclonehttps://github.com/gadgetron/gadgetron.gitcdgadgetroncreate a conda environment using environment.ymlcondaenvcreate-fenvironment.ymlIf this step cost forever, you may try mamba, it may save you:condaactivate
condainstallmamba-cconda-forge
mambaenvcreate-fenvironment.ymlstart gadgetron environment, then build gadgetroncondaactivategadgetron

mkdir-pbuildcdbuild
cmake-GNinja-DCMAKE_BUILD_TYPE=Release-DUSE_MKL=ON-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}../
ninja
ninjainstalltest gadgetron# check gadgetron info$gadgetron--info02-1710:50:55.456DEBUG[gadgetron_paths.cpp:117]Executablepath:"/home/uih/miniconda3/envs/gadgetron/bin/gadgetron"02-1710:50:55.456DEBUG[gadgetron_paths.cpp:123]DefaultGadgetronhome:"/home/uih/miniconda3/envs/gadgetron"02-1710:50:55.456WARNING[initialization.cpp:38]Environmentvariable'OMP_WAIT_POLICY'notsetto'PASSIVE'.02-1710:50:55.456WARNING[initialization.cpp:39]Gadgetronmayexperienceseriousperformanceissuesunderheavyload(multiplesimultaneousreconstructions,etc.)02-1710:50:56.418INFO[system_info.cpp:104]CUDADEVICECOUNT0anderrornumber3502-1710:50:56.418INFO[main.cpp:86]GadgetronVersionInfo--Version:4.4.5--GitSHA1:41dd90ee85ffe5fd3a0cc6a43422854541931be6--SystemMemorysize:11964MB--PythonSupport:YES--JuliaSupport:NO--MatlabSupport:NO--CUDASupport:YES--NVCCFlags:-gencodearch=compute_60,code=sm_60;-gencodearch=compute_61,code=sm_61;-gencodearch=compute_70,code=sm_70;-gencodearch=compute_75,code=sm_75;-gencodearch=compute_80,code=sm_80;-gencodearch=compute_86,code=sm_86--std=c++17*NumberofCUDAcapabledevices:0# start a gadgetron server$gadgetron02-1710:50:31.535DEBUG[gadgetron_paths.cpp:117]Executablepath:"/home/uih/miniconda3/envs/gadgetron/bin/gadgetron"02-1710:50:31.535DEBUG[gadgetron_paths.cpp:123]DefaultGadgetronhome:"/home/uih/miniconda3/envs/gadgetron"02-1710:50:31.535WARNING[initialization.cpp:38]Environmentvariable'OMP_WAIT_POLICY'notsetto'PASSIVE'.02-1710:50:31.535WARNING[initialization.cpp:39]Gadgetronmayexperienceseriousperformanceissuesunderheavyload(multiplesimultaneousreconstructions,etc.)02-1710:50:31.535INFO[main.cpp:90]Gadgetron4.4.5[41dd90ee85ffe5fd3a0cc6a43422854541931be6]02-1710:50:31.536DEBUG[storage.cpp:68]Foundstorageserver:/home/uih/miniconda3/envs/gadgetron/bin/mrd-storage-server02-1710:50:31.536INFO[storage.cpp:69]Startingstorageserveronport911202-1710:50:31.537INFO[storage.cpp:28]Verifyingconnectivitytostorageserver...{"level":"info","time":"2023-02-17T10:50:31.582+08:00","message":"Listening on port 9112"}{"level":"info","requestId":"9c1d8c90-ab1f-4fd7-a963-89103fc90ef6","status":200,"method":"GET","path":"/healthcheck","query":"","latencyMs":1.56,"time":"2023-02-17T10:50:31.743+08:00","message":"request completed"}02-1710:50:31.743INFO[storage.cpp:33]Receivedsuccessfulresponsefromstorageserver.02-1710:50:31.743INFO[main.cpp:99]Runningonport900202-1710:50:31.743INFO[Server.cpp:25]Gadgetronhomedirectory:"/home/uih/miniconda3/envs/gadgetron"02-1710:50:31.743INFO[Server.cpp:26]Gadgetronworkingdirectory:"/tmp/gadgetron/"Generate an ismrmrd raw data and do reconstruction using gadgetron# generate a dataset in the current working directory (./testdata.h5) with 8 coils and 10 repetitions.$ismrmrd_generate_cartesian_shepp_logan-r10GeneratingCartesianSheppLoganPhantom!!!
Acceleration:1$gadgetron_ismrmrd_client-ftestdata.h5
GadgetronISMRMRDclient--host:localhost--port:9002--hdf5filein:testdata.h5--hdf5groupin:/dataset--conf:default.xml--loop:1--hdf5fileout:out.h5--hdf5groupout:2023-02-1711:31:57Now you could see a out.h5 file in the current directory.UsageResearchersFor who wants to install this repo directly in your conda environment, without modifying the code:pipinstallgit+https://github.com/medlab/ugad4fun.gitDevelopersFor who wants to contribute to this repo, you may need follow steps below to install ugad4fun:clone this repository to your workspacegitclonehttps://github.com/medlab/ugad4fun.gitcdugad4funuse pip to install this package in editable mode:pipinstall-e.link the config directory to gadgetron-required locationshscripts/link_config.shDeploymentClone the repository to your workspace, then create a Docker image using scripts provided.gitclonehttps://github.com/medlab/ugad4fun.gitcdugad4fun/scripts
bashcreate_gad_image.sh
bashstart_gad_container.shReference:https://gadgetron2020.sciencesconf.org/https://gadgetron.readthedocs.io/https://github.com/gadgetron/GadgetronOnlineClasshttps://github.com/chidiugonna/learn-gadgetronhttps://github.com/ismrmrd/ismrmrdviewer