Gannet on Siemens .dcm files

Yep, it will find all the files in the folder ending in *.dcm.

1 Like

It now worked without any problem. Thanks so much, Mark! :slight_smile:

1 Like

Hi, my metabolic and water respectively have 4. dcm files. I use this ’ GitHub - markmikkelsen/Gannet at dev ’ , matlab version 2022, it report bug

MRS = GannetLoad({metab/00002.dcm}, {water/00002.dcm});

Invalid use of operator.

if I change the .dcm filename, it report other bug
MRS = GannetLoad({metab/one.dcm}, {water/one.dcm});
Unrecognized function or variable ‘metab’.

You need to put ' around the filenames, i.e.

MRS = GannetLoad({'metab/00002.dcm'}, {'water/00002.dcm'});

thanks, while there show other bug,

Hi @Lejia,

This seems to tell me that one or more of your .dcm files is empty and/or corrupted. Could you please check the file sizes of all your files?

Mark

Also, I highly recommend exporting your data in TWIX format (*.dat) instead of .dcm files.

Hi @mmikkel ,
Thanks your reply, I checked my data, these file isn’t empety, meanwhile, I run other two subjects data, it also show this bug. For exporting my data in TWIX format (.dat) instead of .dcm files, my data have been completed to collect, my raw data file haven’t any extension and have only one supress or unsupress water file. After sort, there have 4 .dcm files for supress or unsupress water. For this condition, Can my data be converted to TWIX format (.dat)?

Lejia

Can you share your data with me so I can test it? My email is mam4041@med.cornell.edu

You can remove participant information from the DICOM files in Matlab using the Gannet function DICOMDeIdentify. Please run help DICOMDeIdentify for usage instructions.

If you’ve already completed your data collection and exported the data files, then you can’t convert them to the TWIX format (unless your data are still on your scanner, which I suspect they are not).

I actually ran into a problem with this last week – on case-sensitive filesystems, this was breaking if the filenames were *.DCM instead of *.dcm. Not sure it’s the same problem (and I’m afraid I didn’t take the time to make a clean, general workaround, I just capitalised DCM in the reader function…)

[in response to the older part of this thread]

Crossposting from another thread:

My guess is that you’re either trying to feed a corrupted DICOM (like @mmikkel said) or one that isn’t an MRS DICOM, but rather an image one. Can you confirm that you’ve run some sort of DICOM series sorting (like the one in BIDScoin) and that your water and metab folders ONLY include MRS DICOMs?

@alex, that’s a different issue, but thanks for the heads up! A simple fix, I think, would be to change line 51 in DICOMRead.m to:

[~,~,ext] = fileparts(metabfile);
dcm_file_list = dir(fullfile(folder, ['*' ext]));

(You would do the same for the water files on line 130.)

I am unable to load the .dcm and .ima files. Would it be better if I convert them to .dat format?

@Gao,

You cannot convert .dcm/.ima files to .dat files. You will need to export the original raw data on the scanner in the .dat format.

Mark

Hi @mmikkel,

I am having a similar issue to @Lejia I think. I am missing a .dat file for my MEGAPRESS water reference because it didn’t get saved at the time of the scan. I have 3 DICOM files instead, all are 141KB and look similar to other scans which have been analysed (using .dat files) without any issue. I have a metabolite .dat file.

I get this error when I tried to run the analysis with .dcm files as you suggested:

Do you know what I might be doing wrong?

Many thanks, James

Hi @jbarnacle,

Please see this post: Gannet on Siemens .dcm files - #20 by admin

Are you sure you’ve exported your data correctly?

Mark

Hi @mmikkel, I read through this and the Gannet manual, but I’m still confused how to load .dcm GE (rather than Siemens) files. I have only 1 dicom file, rather than separate water reference, etc. files. Could you please help with more guidance?

Hi @z_ilchovska,

MRS data acquired on GE scanners should be exported as P-files (.7). The saved DICOM files are simply the sum of all the data, which is not what you want to use for data processing. I suggest you work with your MR technician/radiographer to re-export your data in the P-file format.

Mark

Hi @mmikkel, thank you for your reply. The reason I’ve resolved to the dicoms is because, due to system failure, we lost the P-files, and are not able to generate these post-scanning in our case. I was wondering whether there is any way around it with .nii files or anything else you might suggest as tools? Also, apologies if any question is self-explanatory, I’m very fresh to all this.

Unfortunately, P-files are what are needed to process GE MRS data.