Program: gdcm
Module: $RCSfile: gdcmJPEGFragment.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 16:51:36 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2008/01/02 10:48:52 $
+ Version: $Revision: 1.20 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmJPEGFragment.h"
#include "gdcmDebug.h"
-namespace gdcm
+namespace GDCM_NAME_SPACE
{
//-------------------------------------------------------------------------
// For JPEG 2000, body in file gdcmJpeg2000.cxx
}
else if ( nBits <= 12 )
{
+ assert( nBits >= 8 );
// JPEG Lossy : call to IJG 6b - 12 bits
ReadJPEGFile12 ( fp, buffer, statesuspension);
}
else if ( nBits <= 16 )
{
+ assert( nBits >= 12 );
// JPEG Lossy : call to IJG 6b - 16 bits
ReadJPEGFile16 ( fp, buffer, statesuspension);
//gdcmAssertMacro( IsJPEGLossless );
* @param os Stream to print to.
* @param indent Indentation string to be prepended during printing.
*/
-void JPEGFragment::Print( std::ostream &os, std::string indent )
+void JPEGFragment::Print( std::ostream &os, std::string const &indent )
{
os << indent
- << "JPEG fragment: offset : " << Offset
- << " length : " << Length
+ << "JPEG fragment: offset : " << std::dec << Offset
+ << " 0x(" << std::hex << Offset << ") "
+ << std::dec << " length : " << Length
+ << " 0x(" << std::hex << Length << ") "
<< std::endl;
}