private int ExtractIntegerValue( string strValue )
{
try
{
// split value from comment
string[] strs = strValue.Split( '/' );
// return value as integer
return int.Parse( strs[0].Trim( ) );
}
catch
{
throw new ArgumentException( "The stream does not contain valid FITS image." );
}
}