[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reading bynary file using struct
From: |
marco cammarata |
Subject: |
Reading bynary file using struct |
Date: |
Fri, 30 May 2008 14:45:36 +0200 |
Hi,
I have to read images recorded with a CCD.
I have the description of the header (as struct, see attached file)
and I'm able to read the images correctly in c or c++:
For example in C:
#include <stdio.h>
#include "marheader.h"
int main ( int argc , char** argv ) {
FILE *f;
f=fopen("test.mccd","rb");
fseek(f, 1024, SEEK_SET); // skip the standard TIFF header
frame_header header;
fread(&header,sizeof(header),1,f);
fclose(f);
return 0;
}
Any idea if something similar can be done in octave ? How ?
Many thanks in advance,
marco
--
Marco Cammarata
European Synchrotron Radiation Facility
Material Science Group
6, rue Jules Horowitz
BP 220, Grenoble Cedex 38043, FRANCE
Beamline ID09b
Office : +33 (0)4 76 88 29 37
Beamline : +33 (0)4 76 88 26 95
Fax : +33 (0)4 76 88 27 43
email: address@hidden
http://www.esrf.fr/UsersAndScience/Experiments/MaterialsScience/ID09B/
http://www.fisica.unipa.it/~emoglobina/marco
~
marheader.h
Description: Text Data
read_mar_header.c
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Reading bynary file using struct,
marco cammarata <=