Castor mCT conversion

Hi. I am struggling to convert the Siemens mCT files to castor. The castor conversion executable keeps reading about a quarter of the input events from the sinogram file, and then exits with an error saying ‘Failed to read all data in input file’. Can anyone help with this? We’ve tried a few different mCT scanner files, using VG50 and VG65 versions. I have never obtained a randoms file from the mCT or E7 toolbox, so I’m unsure if I am supposed to have different events (trues, randoms etc) separated, whereas I have only a single data input file. Thanks in advance for your help. Katie

Randoms are part of the prompts file. You do not need to isolate randoms. The converter was tested for several version including VG50 and VG60. Can you tell us what are exactly your input files (just the command line with the exact file name)?
Thanks

Thomas

Hi Thomas. Thank you so much for your prompt response. I wish I’d done this many days ago! The command line input is the following:

castor-converter-biograph-mct-histogramwindows.exe -p RawData-LM-00-sino-0.s.hdr -n RawData-norm.n.hdr -o output

We generated the sinogram and normalisation files using VG65, and also tested on VG50 and VG62. The error we received for all versions was the following:

***** oSinoModeCreation: :InitPrompt() -› Failed to read all data (542505600) in file 'RawData-LM-00-sino. (13853060 read) !
** SinoModeCreation: : InitInputFiles) -› An error occured while initalizing prompts
** Error while initializing input sinograms !

Is that sufficient information or would you like additional detail on the scanner or data files?

Thank you very much for your help, it is really appreciated.

Katie

It seems that there is a problem with your prompt file. Be sure that the reference in the hdr file is correctly linked with your binary prompt file.

Hi. Do you mean the sino header file, in which it has the line:
!name of data file: =RawData-LM-00-sino-O.s

It’s pointing to the sino file in the same folder. Should it be pointing somewhere else? It’s reading about a quarter of the data so I’m guessing it must have found it. Or is there another file as well?

Thanks again for your help.

Katie

Are you sure your prompt file is uncompressed?

Hmmm…I’m not sure. I have generated the sino file using the e7 toolbox, giving the sino-0.s file with its header. The ptd file is as acquired from the pet scanner. Was I supposed to do something else? It’s very confusing to me that a quarter of the file is being read.

Thanks again,

Katie

Hi,

Sorry if the error message is not clear.
But the converter reads the header first. It finds dimensions and computes the number of data that it is supposed to read (the big number). Then it starts reading the sinogram data. The program stops when the file is finished. This means that in your case, it is not the program that is reading only a quarter of the file, it is the file that contains only a quarter of data.

This is why I guess Thomas is asking you if your sinogram is compressed or not.

Simon

See the header:
!GENERAL DATA:=
%compression:=on

If, it is “on” then this is the wrong sinogram. It should be “off” for CASToR

Oh right, that makes a lot more sense! Thank you both Simon and Thomas.

You are right, compression is set to on. I have regenerated the files with compression set to off. However, now the program runs, prints no output to stdout, saves no files to the output directory, and has been running since Friday (it’s now Monday).

I have also tried another dataset that says compression = off but has not generated a scatters file, and has failed in the same way as when compression was set to on.

I’m really stumped at this point!

Thanks again for your help.

Katie

Just as a follow up to this, I have the compression flag set to off, but the e7 toolbox keeps generating sinograms with compression set to on. Does this happen depending on the VG version or something?

Thanks,

Katie

You should use the flag -d when e7_recon is involved

Hi

Do you mean the debug flag for e7_recon.exe? Sorry I’m a bit confused as to how this can help.

Cheers,

Katie

Dear CASToR Users and Developers,

I am also trying to convert the Siemens mCT E7tool interfile to castor. However, the castor conversion executable can not read the entire interfile. I have tried compressed and uncompressed prompt. But, the following error still persist. Can anyone help with this?

I am using this command line:
castor-converter-biograph-mct-histogram_unix64bits -p ***.s.hdr -n ***.n.hdr -o output

The error for uncompressed prompt:
***** oSinoModeCreation::InitPrompt() → Failed to read all data (542505600) in file ‘/home/hamidreza/CASToR/New_Data/sino.uncompressed.s’ (292118400 read) !
***** oSinoModeCreation::InitInputFiles() → An error occured while initalizing prompts !
***** Error while initializing input sinograms !

The error for compressed prompt:
***** oSinoModeCreation::InitPrompt() → Failed to read all data (542505600) in file ‘/home/hamidreza/CASToR/New_Data/PSHDCHEST01-05-sino.s’ (5599913 read) !
***** oSinoModeCreation::InitInputFiles() → An error occured while initalizing prompts !
***** Error while initializing input sinograms !

Dear cdavey,

I am also trying to convert the Siemens mCT E7tool interfile to castor. However, the castor conversion executable can not read the entire interfile. I have tried compressed and uncompressed prompt. But, the following error still persist. Were you able to solve your problem?

I am using this command line:
castor-converter-biograph-mct-histogram_unix64bits -p ***.s.hdr -n ***.n.hdr -o output

The error for uncompressed prompt:
***** oSinoModeCreation::InitPrompt() → Failed to read all data (542505600) in file ‘/home/hamidreza/CASToR/New_Data/sino.uncompressed.s’ (292118400 read) !
***** oSinoModeCreation::InitInputFiles() → An error occured while initalizing prompts !
***** Error while initializing input sinograms !

The error for compressed prompt:
***** oSinoModeCreation::InitPrompt() → Failed to read all data (542505600) in file ‘/home/hamidreza/CASToR/New_Data/PSHDCHEST01-05-sino.s’ (5599913 read) !
***** oSinoModeCreation::InitInputFiles() → An error occured while initalizing prompts !
***** Error while initializing input sinograms !