mlib3/mlib3analyze.cpp
/*************************************************************
*	Read Analyze header .hdr from file pointer
**************************************************************/
Read Analyze header .hdr from file pointer
Read Analyze header . hdr from file pointer
bool Analyze::ReadHeader(FILE* fp)
{
	int nRead=fread(&m_dsr,1,sizeof(struct dsr),fp);
	int sz=sizeof(struct dsr);
	int err=ferror(fp);
	int eof=feof(fp);
	if(err || eof || nRead <=0 ) return false;
	m_bSwapEndian=false;
	if(m_dsr.dime.dim[0]<0 || m_dsr.dime.dim[0]>15) 
	{
		m_bSwapEndian=true;
		swap_hdr(&m_dsr);
	}
	return true;
}
bool Analyze :: ReadHeader ( FILE * fp ) { int nRead = fread ( & m_dsr , 1 , sizeof ( struct dsr ) , fp ) ; int sz = sizeof ( struct dsr ) ; int err = ferror ( fp ) ; int eof = feof ( fp ) ; if ( err || eof || nRead <= 0 ) return false ; m_bSwapEndian = false ; if ( m_dsr . dime . dim [ 0 ] < 0 || m_dsr . dime . dim [ 0 ] > 15 ) { m_bSwapEndian = true ; swap_hdr ( & m_dsr ) ; } return true ; }
Read Analyze header .hdr from file pointer
Read Analyze header . hdr from file pointer
//	if(nRead != sizeof(struct dsr)) return false;