Problem in loading SIEMENS data in TWIX (.dat format) in Osprey

Hi,

I am a graduate student and currently working on an MRS project. I am a beginner in this field and trying to learn MRS, in specific, measurement of GABA by MEGA-PRESS sequence.
I measured phantom GABA data in a 3T SIEMENS Prisma machine and wanted to analyze the data in Osprey. Can someone please help me how to resolve this issue?

Though Osprey runs fine in my system with the example dataset. But, I am not able to load my SIEMENS MEGA-PRESS data (.dat format, obtained from Siemens 3T Prisma machine via TWIX).
This is the error, I am getting -------------------------------

Error using fseek
Invalid file identifier. Use fopen to generate a valid file
identifier.
Error in mapVBVD (line 285)
fseek(fid,0,‘eof’);
Error in io_loadspec_twix (line 34)
twix_obj=mapVBVD(filename);
Error in osp_LoadTwix (line 64)
raw =
io_loadspec_twix(MRSCont.files{kk});
Error in OspreyLoad (line 60)
[MRSCont] = osp_LoadTwix(MRSCont);
Error in osp_onLoad (line 32)
MRSCont = OspreyLoad(MRSCont);
Error while evaluating UIControl Callback.


Thanks,
Swagata

Hi Swagata,

That means that your job file is pointing to a file that doesn’t exist. Make sure you have provided the full paths to each file, either procedurally or explicitly.

Best,
Georg

Thank you George, Osprey is working for my MEGA data now!
The mistake was - I was giving the path of the folder which contains the file but not the file.

Thanks,
Swagata

1 Like

Great! Yes, you’d provide a whole folder only for DICOM data where each average is a separate DICOM file.

Let us know if you run into further trouble.
Best,
georg

Hi Georg,

I am having the same problem, but I was giving Osprey filepaths as Input. I have .IMA MPRESS data and saved the .IMA file in a seperate folder and made sure its on the matlab path. Still Osprey can not find the data, as it seem. I tried loading it into LCModel and it works, so the file does not seem to be corrupted. Have you any idea, why there might be a problem? I tried uploading the job file, but json and mat files dont seem to be allowed
Kind regards
Hans

Ps. This is the matlab error message:
Timestamp November 30, 2022 15:24:15 Osprey 2.4.0 OspreyLoad
Loading raw data from dataset 1 out of 1 total datasets…
Error using fgets
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in read_dcm_header (line 29)
tline = fgets(fid); % get first line

Error in io_loadspec_dicom (line 32)
DicomHeader = read_dcm_header(filesInFolder{1});

Error in osp_LoadDICOM (line 67)
raw = io_loadspec_dicom(MRSCont.files{metab_ll,kk});

Error in OspreyLoad (line 185)
[MRSCont] = osp_LoadDICOM(MRSCont);

Error in osp_onLoad (line 35)
MRSCont = OspreyLoad(MRSCont);

Error while evaluating UIControl Callback.

Hi Hans,

Can you post the lines for files and files_ref from the job file?

Thanks,
Georg

Thank you Georg for your quick reply!

Sure, the lines are:

“files”: [“C:\Users\Verwalter\Downloads\Spektro_Test\fmc002\MPRESS_rechts\FMC002_1_1.IMA”],
“files_ref”: [“C:\Users\Verwalter\Downloads\Spektro_Test\fmc002\Wasser_rechts\FMC002_2_1.IMA”]

OK, that looks fine - can you also post screenshots of the contents of the two directories? (There really can’t be any other files in the directories that don’t belong to these specific acquisitions)

But there must be no other files in the one folder of the specific .IMA file, right? Generally the data is located in subdirectories of my download folder, which also stores other data.

Oh - just one file? I think we usually expect one DICOM file per transient, i.e., hundreds of files per scan. What MEGA-PRESS sequence is this, the Siemens WIP or a Minnesota (CMRR) sequence?

Sorry for the late response, I had to recheck with our MR physicist. Yes, we used Minnesota Pulse Sequences by the Siemens platform. Do you think that’s the problem?

hello Gearg,

I am a graduate student of medical physics at the university autonoma metropolitana . i am working on the analysis of covid-19 spectrums at the Hospital Infantil de Mexico Federico Gomez, SIEMMES SKYRA 3T

I AM HAVING TROUBLE LOADING MY .IMA FILES. I ran the TWIX example and everything worked pefectly but when I try to load my .IMA files, I get the following error message:

Error using fgets
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in read_dcm_header (line 29)
tline = fgets(fid); % get first line

Error in io_loadspec_dicom (line 32)
DicomHeader = read_dcm_header(filesInFolder{1});

Error in osp_LoadDICOM (line 67)
raw = io_loadspec_dicom(MRSCont.files{metab_ll,kk});

Error in OspreyLoad (line 187)
[MRSCont] = osp_LoadDICOM(MRSCont);

Error in osp_onLoad (line 35)
MRSCont = OspreyLoad(MRSCont);

Error while evaluating UIControl Callback.

any help, adviced would be gratly appreciate.

thanks you so much for creating this program.
I send you the .IMA file and the resonator data
Brandon Macias