Commit cc283053 authored by myron's avatar myron

added header size to edf files

parent af0a209f
......@@ -1286,9 +1286,9 @@ void write_data_to_edf( float *SLICE, int num_y,int num_x, const char * nome
if( byteorder()== LowByteFirst ) {
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nByteOrder = LowByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\n",num_y*((long)num_x)*4,num_x,num_y);
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nEDF_HeaderSize = 1024 ;\nByteOrder = LowByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\n",num_y*((long)num_x)*4,num_x,num_y);
} else {
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nByteOrder = HighByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\n",num_y*((long)num_x)*4,num_x,num_y);
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nEDF_HeaderSize = 1024 ;\nByteOrder = HighByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\n",num_y*((long)num_x)*4,num_x,num_y);
}
len=strlen(s);
fwrite(s,1,len,output);
......@@ -1316,9 +1316,9 @@ void write_data_to_edf_restrained( float *SLICE, int num_y,int num_x,
if( byteorder()== LowByteFirst ) {
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nByteOrder = LowByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\nFirst_2 = %d ;\nOri_2 = %d ;\n",real_num_y*((long)num_x)*4,num_x,real_num_y, start_y, num_y );
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nEDF_HeaderSize = 1024 ;\nByteOrder = LowByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\nFirst_2 = %d ;\nOri_2 = %d ;\n",real_num_y*((long)num_x)*4,num_x,real_num_y, start_y, num_y );
} else {
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nByteOrder = HighByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\nFirst_2 = %d ;\nOri_2 = %d ;\n",real_num_y*((long)num_x)*4,num_x,real_num_y, start_y, num_y );
sprintf(s,"{\nHeaderID = EH:000001:000000:000000 ;\nImage = 1 ;\nEDF_HeaderSize = 1024 ;\nByteOrder = HighByteFirst ;\nSize = %ld ;\nDim_1 = %d ;\nDim_2 = %d ;\nDataType = Float ;\nFirst_2 = %d ;\nOri_2 = %d ;\n",real_num_y*((long)num_x)*4,num_x,real_num_y, start_y, num_y );
}
len=strlen(s);
fwrite(s,1,len,output);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment