When using the dicom import and directly saving as .dwi the measurement frame is stored as follows:
measurement frame:= ( 1.000000 , 0.000000 , 0.000000 ) ( 0.000000 , 1.000000 , 0.000000 ) ( 0.000000 , 0.000000 , 1.000000 ) \n
The high occurence of spaces make it difficult to preprocess the data correctly by the python script. It would be better if it saves this line like
measurement frame:= (1.000000,0.000000,0.000000) (0.000000,1.000000,0.000000) (0.000000,0.000000,1.000000)
Editing the file by hand after importing introduces problems when loading the data it the data are not split in header/raw.