Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created BlochVoxelDictSimulation simulation method #348

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

depedraza
Copy link

@depedraza depedraza commented Mar 29, 2024

Implementation of a dictionary simulation method for MRF applications. The implementation in BlochVoxelDictSimulation.jl relies on the usage of the phantom defined in T1T2_voxel_phantom.jl in order to perform the simulations. Both files will be described as follows:

  1. BlochVoxelDictSimulation.jl: simulation method that performs the simulation of a sequence assuming an input that corresponds to an array of phantom objects. In particular, it uses a concatenation (by summing over a list of phantoms) of several T1T2_voxel_phantom.jl instances in order to simulate the MR signal for each of the instances (i.e. voxels). It assumes that each voxel has a unique ID value, that allows the method to perform the assignment of the signal per voxel, so when the contribution from each thread is summed in order to retrieve the signal, there is no "cross-talking" between different voxels, as it may happen that spins from different voxels are assigned to a same particular thread. The method returns a dictionary with size $N_{combinations} \times N_{timepoints}$, where each combination corresponds to a voxel phantom object with a particular $T_{1}-T_{2}$ combination (and a unique ID) and the timepoints correspond to the number of readouts performed per TR, that is, the amount of shots acquired through all the simulated sequence, considering an MRF framework. It only works on CPU for now as some issues need to be solved so the method is also GPU compatible.

  2. T1T2_voxel_phantom.jl: defines a phantom object that can receive 3 input parameters, a $T_{1}$ and a $T_{2}$ value (Float, in ms) and a unique ID (Int) that is assigned to each of the spins of the voxel, under the Dλ1 parameter (will change in the future). This ID is used by the simulation method described above in order to properly identify and assign the signals from the spins to its corresponding phantom object. By the moment, the voxel dimensions are set for a particular MRF application context ($2 \times 2 \times10$ $mm^{3}$) and the number of spins per voxel is currently defined as $1\times 1 \times 101$, which will be probably modified so that these parameter can be user defined.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 87.94%. Comparing base (a2837ae) to head (6607be5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
- Coverage   90.52%   87.94%   -2.59%     
==========================================
  Files          51       53       +2     
  Lines        2787     2812      +25     
==========================================
- Hits         2523     2473      -50     
- Misses        264      339      +75     
Flag Coverage Δ
base 88.20% <ø> (ø)
core 73.62% <0.00%> (-16.76%) ⬇️
files 93.00% <0.00%> (-0.55%) ⬇️
komamri 93.98% <ø> (ø)
plots 89.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
KomaMRIFiles/src/Phantom/T1T2_voxel_phantom.jl 0.00% <0.00%> (ø)
...e/src/simulation/Bloch/BlochVoxelDictSimulation.jl 0.00% <0.00%> (ø)

... and 7 files with indirect coverage changes

@depedraza
Copy link
Author

depedraza commented Apr 2, 2024

Added t1mes_lowfield_phantom.jl, it contains a simple version of IR-SE T1/T2 reference values of a standardized T1MES phantom obtained at 0.55T. It can be used for sequence testing and optimization.

image

image

@cncastillo
Copy link
Member

cncastillo commented Apr 3, 2024

Thanks @depedraza !!!

I changed a few things in KomaMRICore (I changed how the simulation_method extension works in 148a257), this should simplify how Koma is extended.

I will take a look at the other functions later.

  • include new sim method in KomaMRICore
  • Check new voxel phantom, remove imports. Use ExtendedPhantom(phantom, idx)
  • Check new low field phantom, remove noise (removes the Distributions.jl dep.)
  • Add test to solve codecov issue

@cncastillo
Copy link
Member

Hi @depedraza, can you upload an example on how to use this?

@depedraza
Copy link
Author

Hi @cncastillo, sure thing, will do it today.

@cncastillo
Copy link
Member

cncastillo commented Jul 10, 2024

Hi @depedraza! I think more people may want to use this, it would be cool if you could update it :).

@cncastillo cncastillo force-pushed the lowfield/mrf_dict_simulation branch from 11bd510 to c57c44d Compare July 10, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants