Hi,
To define my own phantom, I am first creating arrays in Matlab for the whole phantom in terms of M0, T1, T2, T2S (T2*) and DB, and also (1,3) arrays containing the resolution and offset of each dimension. These arrays are all combined in a single structure which I save as a .mat file.
I’m then providing this .mat file as an input to the writeSample.m function (from either the JEMRIS download or the k-t BLAST example) to create an .h5 file in a suitable format and structure for the simulations.
Recently I’ve needed to create very large arrays which I’ve found easier to do in Python. The .h5 files can be directly created using the h5py library. The .h5 files appear to contain relaxation rates (1/T1 etc) instead of relaxation times (writeSample.m converts relaxation times to rates when writing .h5 files).
This is what I’m doing to define my own phantoms at the moment, hope it helps!
Best wishes,
Sarah
Hi both,
I’ve attached the script I use to create the samples in 2D. The created h5 sample can be used in the simu.xml file if using the command line, but for the MATLAB GUI a .mat file is required.
‘Large’ arrays (for me, at least!) produce ‘out of memory’ errors in MATLAB and am not able to simulate in parallel using JEMRIS on my desktop. I’ve just started using a cluster and haven’t experienced any issues yet. But I will be scaling up the arrays soon, so thanks for the pytables tip!
Best wishes,
Sarah