Module ukat.utils.siemens
Functions
def write_dvs(scheme, filepath, normalization='none', coordinate_system='xyz', comment='N/A')
-
Create Siemens .dvs file for diffusion imaging acquisitions
Parameters
scheme
:string
-
Scheme can be two types of strings: 1) File path to a text file containing a gradient scheme (see below) 2) A gradient scheme string (see below)
The following is an example of a dummy gradient scheme initialised in the
SCHEME
varible: >> print(SCHEME) 0.70710678 0.0 0.70710678 0 0.70710678 0.0 0.70710678 5 0.70710678 0.0 0.70710678 100 0.70710678 0.0 0.70710678 500 -0.70710678 0.70710678 0.0 5 -0.70710678 0.70710678 0.0 100 -0.70710678 0.70710678 0.0 500Where each row corresponds to one measurement, the first 3 columns are the b-vector components (b-vector with norm 1) and the 4th column is the b-value in s/mm2. This example shows an acquisition with 3 nonzero b-values (5, 100, 500), each with two directions, and one b=0 in the start of the acquisition. Such a gradient scheme string can be generated using ukat.dwi.make_gradient_scheme().
filepath
:string
- The filepath (without extension) for the .dvs file which will be generated by this function
Returns
string
- filepath of generated file, including extension
string
- content of generated file
Notes
The specification for Siemens .dvs files implemented here is described in the Siemens syngo MR E11 Operator Manual page 140. It may not work for other software lines (e.g. VX*). Note that the validity in the formatting of the
scheme
string is not checked so ensure you have generated it properly as shown above.