Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:34 $
- Version: $Revision: 1.307 $
+ Date: $Date: 2005/10/26 09:09:31 $
+ Version: $Revision: 1.310 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Accessor to the Transfer Syntax (when present) of the
* current document (it internally handles reading the
* value from disk when only parsing occured).
- * @return The encountered Transfer Syntax of the current document.
+ * @return The encountered Transfer Syntax of the current document, if DICOM.
+ * GDCM_UNKNOWN for ACR-NEMA files (or broken headers ...)
*/
std::string Document::GetTransferSyntax()
{
// Skip if user wants to write an ACR-NEMA file
if ( filetype == ImplicitVR || filetype == ExplicitVR ||
- filetype == JPEG )
+ filetype == JPEG )
{
// writing Dicom File Preamble
char filePreamble[128];
// It's too late to do the Job
// (we should check the value, but we know it after LoadDocEntry ...)
- // Uncoment this printf line to be able to 'follow' the DocEntries
+ // Uncoment this cerr line to be able to 'follow' the DocEntries
// when something *very* strange happens
- //printf( "%04x|%04x %s\n",newDocEntry->GetGroup(),
- // newDocEntry->GetElement(),
- // newDocEntry->GetVR().c_str() );
+ if( Debug::GetDebugFlag() )
+ std::cerr<<newDocEntry->GetKey()<<" "<<newDocEntry->GetVR()<<std::endl;
if ( !newDocEntry )
{
VRKey vr;
Fp->read(&(vr[0]),(size_t)2);
- gdcmDebugMacro( "--> VR: " << vr )
+ //gdcmDebugMacro( "--> VR: " << vr )
if ( !CheckDocEntryVR(vr) )
{
gdcmWarningMacro( "Unknown VR '" << vr << "'" )