views:

93

answers:

1

exp data is generated by my mc scaler card as a binary file with first 511 bytes as header and then 24 bit data followed by four bit roi data. i am not a expert in programming. i do understand a little. I would like to convert this file into a file (without header) decimal nos with first col as channel no (1 to 8191) then the data (24 bit) then the Roi data (4 bit). I am looking for source code in c or qbasic. thanks

A: 

In C, use fopen to open the original file (use "rb" as the mode) and fopen to open the output file (use "w" as the mode).

Use fread to read from the binary file, keeping track of where you are. Use fprintf to output formatted data (decimal numbers) to your text file.

tomlogic