39 char *endian_ptr = (
char *)&endian;
45 strcpy(rawfname, filename);
46 strcat(rawfname,
".raw");
47 if ((fp = fopen(rawfname,
"wb")) == NULL) {
55 strcpy(infofname, filename);
56 strcat(infofname,
".info");
57 if ((fp = fopen(infofname,
"wb")) == NULL) {
61 fprintf(fp,
"filename = %s\n", rawfname);
63 fprintf(fp,
"image.header_bytes = 0\n");
64 fprintf(fp,
"image.nblock = %d\n", buf.
nblock);
65 fprintf(fp,
"image.nline = %d\n", buf.
nline);
66 fprintf(fp,
"image.nsample = %d\n", buf.
nsample);
67 fprintf(fp,
"image.nblock * image.nline = %d\n", buf.
nblock * buf.
nline);
68 fprintf(fp,
"image.datatype = %s\n", datatype[buf.
datatype]);
69 fprintf(fp,
"image.datasize = %d\n", buf.
datasize);
70 if (endian_ptr[0] == 1)
71 fprintf(fp,
"image.byteorder = little_endian\n");
73 fprintf(fp,
"image.byteorder = big_endian\n");
HDFFCLIBAPI _fcd _fcd intf intf * datatype
3-dimensional Data Buffer
MTKt_status MtkWriteBinFile3D(const char *filename, MTKt_DataBuffer3D buf)
Write binary file from 3D buffer in stacked block format.
#define MTK_ERR_MSG_JUMP(msg)