]> Creatis software - gdcm.git/commitdiff
BUG: Apparently on Borland uses unsigned char to store boolean, all other plateformns...
authormalaterre <malaterre>
Sat, 5 Feb 2005 01:37:08 +0000 (01:37 +0000)
committermalaterre <malaterre>
Sat, 5 Feb 2005 01:37:08 +0000 (01:37 +0000)
23 files changed:
src/gdcmDebug.h
src/gdcmDicomDir.cxx
src/gdcmDicomDirElement.cxx
src/gdcmDict.cxx
src/gdcmDictSet.cxx
src/gdcmDocEntrySet.cxx
src/gdcmDocument.cxx
src/gdcmElementSet.cxx
src/gdcmFile.cxx
src/gdcmFileHelper.cxx
src/gdcmGlobal.cxx
src/gdcmJpeg2000.cxx
src/gdcmJpegLS.cxx
src/gdcmPixelReadConvert.cxx
src/gdcmRLEFrame.cxx
src/gdcmSQItem.cxx
src/gdcmSeqEntry.cxx
src/gdcmSerieHelper.cxx
src/gdcmTS.cxx
src/gdcmUtil.cxx
src/gdcmVR.cxx
src/jdatadst.cxx
src/jdatasrc.cxx

index f4c364199df00a2bef86f4a165de8953e9fd0cd5..60a4bd489b5455b2101de324ccf8a606f97636d6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 16:51:36 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.30 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -123,11 +123,11 @@ public:
  * @param msg message part
  */
 #ifdef NDEBUG
-#define gdcmVerboseMacro(msg)                               \
+#define gdcmWarningMacro(msg)                               \
 {                                                           \
 }
 #else
-#define gdcmVerboseMacro(msg)                               \
+#define gdcmWarningMacro(msg)                               \
 {                                                           \
    if( Debug::GetDebugFlag() )                              \
    {                                                        \
index 769ce05901da1ceb26b72674f8383b3a45a78d18..fd83573bd5178f14855e3f401b1dc2ea93177a3b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 14:52:24 $
-  Version:   $Revision: 1.127 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.128 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,7 +92,7 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    if ( GetFirstEntry() == 0 ) // when user passed a Directory to parse
    {
       if (!parseDir)
-         gdcmVerboseMacro( "Entry HT empty for file: "<<fileName);
+         gdcmWarningMacro( "Entry HT empty for file: "<<fileName);
 
    // Only if user passed a root directory
    // ------------------------------------
@@ -109,7 +109,7 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
       {
          NewMeta();
 
-         gdcmVerboseMacro( "Parse directory and create the DicomDir");
+         gdcmWarningMacro( "Parse directory and create the DicomDir");
          ParseDirectory();
       }
       else
@@ -126,7 +126,7 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
       DocEntry *e = GetDocEntry(0x0004, 0x1220);
       if ( !e )
       {
-         gdcmVerboseMacro( "NO 'Directory record sequence' (0x0004,0x1220)"
+         gdcmWarningMacro( "NO 'Directory record sequence' (0x0004,0x1220)"
                           << " in file " << fileName);
          /// \todo FIXME : what do we do when the parsed file IS NOT a
          ///       DICOMDIR file ?         
@@ -166,17 +166,17 @@ bool DicomDir::IsReadable()
 {
    if( Filetype == Unknown)
    {
-      gdcmVerboseMacro( "Wrong filetype");
+      gdcmWarningMacro( "Wrong filetype");
       return false;
    }
    if( !MetaElems )
    {
-      gdcmVerboseMacro( "Meta Elements missing in DicomDir");
+      gdcmWarningMacro( "Meta Elements missing in DicomDir");
       return false;
    }
    if( Patients.size() <= 0 )
    {
-      gdcmVerboseMacro( "NO Patient in DicomDir");
+      gdcmWarningMacro( "NO Patient in DicomDir");
       return false;
    }
 
@@ -393,7 +393,7 @@ bool DicomDir::WriteDicomDir(std::string const &fileName)
                                          std::ios::out | std::ios::binary);
    if( !fp ) 
    {
-      gdcmVerboseMacro("Failed to open(write) File: " << fileName.c_str());
+      gdcmWarningMacro("Failed to open(write) File: " << fileName.c_str());
       return false;
    }
 
@@ -460,7 +460,7 @@ void DicomDir::CreateDicomDirChainedList(std::string const &path)
       header = new File( it->c_str() );
       if( !header )
       {
-         gdcmVerboseMacro( "Failure in new gdcm::File " << it->c_str() );
+         gdcmWarningMacro( "Failure in new gdcm::File " << it->c_str() );
          continue;
       }
       
@@ -468,7 +468,7 @@ void DicomDir::CreateDicomDirChainedList(std::string const &path)
       {
          // Add the file to the chained list:
          list.push_back(header);
-         gdcmVerboseMacro( "Readable " << it->c_str() );
+         gdcmWarningMacro( "Readable " << it->c_str() );
        }
        else
        {
@@ -568,7 +568,7 @@ void DicomDir::CreateDicomDir()
    DocEntry *e = GetDocEntry(0x0004, 0x1220);
    if ( !e )
    {
-      gdcmVerboseMacro( "No Directory Record Sequence (0004,1220) found");
+      gdcmWarningMacro( "No Directory Record Sequence (0004,1220) found");
       /// \todo FIXME: what to do when the parsed file IS NOT a DICOMDIR file ? 
       return;         
    }
@@ -576,7 +576,7 @@ void DicomDir::CreateDicomDir()
    SeqEntry *s = dynamic_cast<SeqEntry *>(e);
    if ( !s )
    {
-      gdcmVerboseMacro( "Element (0004,1220) is not a Sequence ?!?");
+      gdcmWarningMacro( "Element (0004,1220) is not a Sequence ?!?");
       return;
    }
 
@@ -596,7 +596,7 @@ void DicomDir::CreateDicomDir()
       }
       else
       {
-         gdcmVerboseMacro( "Not a ValEntry.");
+         gdcmWarningMacro( "Not a ValEntry.");
          continue;
       }
 
@@ -905,7 +905,7 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type,
          {
             if( header->GetFileName().substr(0, path.length()) != path )
             {
-               gdcmVerboseMacro( "The base path of file name is incorrect");
+               gdcmWarningMacro( "The base path of file name is incorrect");
                val = header->GetFileName();
             }
             else
@@ -928,7 +928,7 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type,
 
       if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !
       {
-         gdcmVerboseMacro("GDCM_DICOMDIR_META ?!? should never print that");
+         gdcmWarningMacro("GDCM_DICOMDIR_META ?!? should never print that");
       }
       si->AddEntry(entry);
    }
index 66665db6476f68e3f32eac05dbd24fd609bbf2b6..b526b5bcabe5dfabd4c5b875792224d311c3df7d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:54 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.34 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,7 +41,7 @@ DicomDirElement::DicomDirElement()
    std::ifstream from(filename.c_str());
    if(!from)
    {
-      gdcmVerboseMacro( "Can't open DicomDirElement dictionary" 
+      gdcmWarningMacro( "Can't open DicomDirElement dictionary" 
                         << filename.c_str());
       FillDefaultDIRDict( this );
    }
@@ -70,7 +70,7 @@ DicomDirElement::DicomDirElement()
             type = DD_IMAGE;
          else
          {
-            gdcmVerboseMacro("Unknown type found in the file : "
+            gdcmWarningMacro("Unknown type found in the file : "
                              <<filename.c_str());
             type = DD_UNKNOWN;
          }
index 5da7a207910360e3032658e94ee22d3254b1e69f..21df55adec56ab565ebd62b530c4921e08817b8e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.72 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.73 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,7 +54,7 @@ Dict::Dict(std::string const &filename)
    std::ifstream from( filename.c_str() );
    if( !from )
    {
-      gdcmVerboseMacro( "Can't open dictionary" << filename.c_str());
+      gdcmWarningMacro( "Can't open dictionary" << filename.c_str());
       // Using default embeded one:
       FillDefaultDataDict( this );
    }
@@ -100,7 +100,7 @@ bool Dict::AddEntry(DictEntry const &newEntry)
 
    if(KeyHt.count(key) == 1)
    {
-      gdcmVerboseMacro( "Already present" << key.c_str());
+      gdcmWarningMacro( "Already present" << key.c_str());
       return false;
    } 
    else 
@@ -142,7 +142,7 @@ bool Dict::RemoveEntry(TagKey const &key)
    } 
    else 
    {
-      gdcmVerboseMacro( "Unfound entry" << key.c_str());
+      gdcmWarningMacro( "Unfound entry" << key.c_str());
       return false;
   }
 }
index 5554a8d02bc19bb5e2fdb2f1616edbfe64f9851e..60f837e298c41d289f098b02b1fbd7c8f43244c5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.59 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.60 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -174,7 +174,7 @@ std::string DictSet::BuildDictPath()
       {
          resultPath += '/';
       }
-      gdcmVerboseMacro( "Dictionary path set from environnement");
+      gdcmWarningMacro( "Dictionary path set from environnement");
    } 
    else
    {
index 04dc3a1d9e0e7d3d696886a0ceb7e26672b2f5b9..ceba6d0747a1f6783269b7e8999c00f717eeb569 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 14:49:01 $
-  Version:   $Revision: 1.53 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.54 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -129,7 +129,7 @@ BinEntry *DocEntrySet::GetBinEntry(uint16_t group, uint16_t elem)
    DocEntry *currentEntry = GetDocEntry(group, elem);
    if ( !currentEntry )
    {
-      gdcmVerboseMacro( "No corresponding BinEntry " << std::hex << group <<
+      gdcmWarningMacro( "No corresponding BinEntry " << std::hex << group <<
                          "," << elem);
       return NULL;
    }
@@ -150,7 +150,7 @@ SeqEntry *DocEntrySet::GetSeqEntry(uint16_t group, uint16_t elem)
    DocEntry *currentEntry = GetDocEntry(group, elem);
    if ( !currentEntry )
    {
-      gdcmVerboseMacro( "No corresponding SeqEntry " << std::hex << group <<
+      gdcmWarningMacro( "No corresponding SeqEntry " << std::hex << group <<
                         "," << elem);
       return NULL;
    }
@@ -172,7 +172,7 @@ bool DocEntrySet::SetValEntry(std::string const &content,
    ValEntry *entry = GetValEntry(group, elem);
    if (!entry )
    {
-      gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+      gdcmWarningMacro( "No corresponding ValEntry " << std::hex << group <<
                          "," << elem << " element (try promotion first).");
       return false;
    }
@@ -194,7 +194,7 @@ bool DocEntrySet::SetBinEntry(uint8_t *content, int lgth,
    BinEntry *entry = GetBinEntry(group, elem);
    if (!entry )
    {
-      gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+      gdcmWarningMacro( "No corresponding ValEntry " << std::hex << group <<
                         "," << elem << " element (try promotion first).");
       return false;
    }
@@ -268,7 +268,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
       {
          if( !RemoveEntry(currentEntry) )
          {
-            gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+            gdcmWarningMacro( "Removal of previous DocEntry failed.");
 
             return NULL;
          }
@@ -282,7 +282,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
 
       if ( !AddEntry(valEntry) )
       {
-         gdcmVerboseMacro("AddEntry failed although this is a creation.");
+         gdcmWarningMacro("AddEntry failed although this is a creation.");
 
          delete valEntry;
          return NULL;
@@ -328,7 +328,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth,
       {
          if( !RemoveEntry(currentEntry) )
          {
-            gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+            gdcmWarningMacro( "Removal of previous DocEntry failed.");
 
             return NULL;
          }
@@ -342,7 +342,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth,
 
       if ( !AddEntry(binEntry) )
       {
-         gdcmVerboseMacro( "AddEntry failed allthough this is a creation.");
+         gdcmWarningMacro( "AddEntry failed allthough this is a creation.");
 
          delete binEntry;
          return NULL;
@@ -399,7 +399,7 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem)
       {
          if (!RemoveEntry(currentEntry))
          {
-            gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+            gdcmWarningMacro( "Removal of previous DocEntry failed.");
 
             return NULL;
          }
@@ -412,7 +412,7 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem)
 
       if( !AddEntry(seqEntry) )
       {
-         gdcmVerboseMacro( "AddEntry failed allthough this is a creation.");
+         gdcmWarningMacro( "AddEntry failed allthough this is a creation.");
 
          delete seqEntry;
          return NULL;
@@ -449,7 +449,7 @@ ValEntry *DocEntrySet::NewValEntry(uint16_t group,uint16_t elem,
    ValEntry *newEntry = new ValEntry(dictEntry);
    if (!newEntry) 
    {
-      gdcmVerboseMacro( "Failed to allocate ValEntry");
+      gdcmWarningMacro( "Failed to allocate ValEntry");
       return 0;
    }
    return newEntry;
@@ -473,7 +473,7 @@ BinEntry *DocEntrySet::NewBinEntry(uint16_t group, uint16_t elem,
    BinEntry *newEntry = new BinEntry(dictEntry);
    if (!newEntry) 
    {
-      gdcmVerboseMacro( "Failed to allocate BinEntry");
+      gdcmWarningMacro( "Failed to allocate BinEntry");
       return 0;
    }
    return newEntry;
@@ -494,7 +494,7 @@ SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group, uint16_t elem)
    SeqEntry *newEntry = new SeqEntry( dictEntry );
    if (!newEntry)
    {
-      gdcmVerboseMacro( "Failed to allocate SeqEntry");
+      gdcmWarningMacro( "Failed to allocate SeqEntry");
       return 0;
    }
    return newEntry;
@@ -533,7 +533,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
    Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
    if (!pubDict) 
    {
-      gdcmVerboseMacro( "We SHOULD have a default dictionary");
+      gdcmWarningMacro( "We SHOULD have a default dictionary");
    }
    else
    {
index 0b0a77caa8206c9265fa386197b81b263c7f83f4..38595140ebb1661ab1a1bb723a89780681910ce5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/03 10:03:07 $
-  Version:   $Revision: 1.222 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.223 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -72,7 +72,7 @@ Document::Document( std::string const &filename )
 
    Group0002Parsed = false;
 
-   gdcmVerboseMacro( "Starting parsing of file: " << Filename.c_str());
+   gdcmWarningMacro( "Starting parsing of file: " << Filename.c_str());
   // Fp->seekg( 0,  std::ios::beg);
    
    Fp->seekg(0, std::ios::end);
@@ -225,13 +225,13 @@ bool Document::IsReadable()
 {
    if( Filetype == Unknown)
    {
-      gdcmVerboseMacro( "Wrong filetype");
+      gdcmWarningMacro( "Wrong filetype");
       return false;
    }
 
    if ( IsEmpty() )
    { 
-      gdcmVerboseMacro( "No tag in internal hash table.");
+      gdcmWarningMacro( "No tag in internal hash table.");
       return false;
    }
 
@@ -332,7 +332,7 @@ std::string Document::GetTransferSyntaxName()
    }
    if ( transferSyntax == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Unfound Transfer Syntax (0002,0010)");
+      gdcmWarningMacro( "Unfound Transfer Syntax (0002,0010)");
       return "Uncompressed ACR-NEMA";
    }
 
@@ -402,7 +402,7 @@ std::ifstream *Document::OpenFile()
 
    if(Fp)
    {
-      gdcmVerboseMacro( "File already open: " << Filename.c_str());
+      gdcmWarningMacro( "File already open: " << Filename.c_str());
       CloseFile();
    }
 
@@ -432,7 +432,7 @@ std::ifstream *Document::OpenFile()
    {
       std::string msg 
          = Util::Format("ACR/DICOM with no preamble: (%04x)\n", zero);
-      gdcmVerboseMacro( msg.c_str() );
+      gdcmWarningMacro( msg.c_str() );
       return Fp;
    }
  
@@ -452,7 +452,7 @@ std::ifstream *Document::OpenFile()
    }
  
    CloseFile();
-   gdcmVerboseMacro( "Not DICOM/ACR (missing preamble)" << Filename.c_str());
+   gdcmWarningMacro( "Not DICOM/ACR (missing preamble)" << Filename.c_str());
  
    return 0;
 }
@@ -554,7 +554,7 @@ void Document::LoadEntryBinArea(BinEntry *elem)
    uint8_t *a = new uint8_t[l];
    if( !a )
    {
-      gdcmVerboseMacro( "Cannot allocate BinEntry content");
+      gdcmWarningMacro( "Cannot allocate BinEntry content");
       return;
    }
 
@@ -810,7 +810,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
                  !Global::GetVR()->IsVROfBinaryRepresentable(vr) )
             { 
                 ////// Neither ValEntry NOR BinEntry: should mean UNKOWN VR
-                gdcmVerboseMacro( std::hex << newDocEntry->GetGroup() 
+                gdcmWarningMacro( std::hex << newDocEntry->GetGroup() 
                                   << "|" << newDocEntry->GetElement()
                                   << " : Neither Valentry, nor BinEntry." 
                                   "Probably unknown VR.");
@@ -1158,7 +1158,7 @@ void Document::LoadDocEntry(DocEntry *entry)
    if( length % 2 )
    {
       newValue = Util::DicomString(str, length+1);
-      gdcmVerboseMacro("Warning: bad length: " << length <<
+      gdcmWarningMacro("Warning: bad length: " << length <<
                        ",For string :" <<  newValue.c_str()); 
       // Since we change the length of string update it length
       //entry->SetReadLength(length+1);
@@ -1173,7 +1173,7 @@ void Document::LoadDocEntry(DocEntry *entry)
    {
       if ( Fp->fail() || Fp->eof())
       {
-         gdcmVerboseMacro("Unread element value");
+         gdcmWarningMacro("Unread element value");
          valEntry->SetValue(GDCM_UNREAD);
          return;
       }
@@ -1373,7 +1373,7 @@ uint32_t Document::FindDocEntryLengthOBOrOW()
       if ( group != 0xfffe || ( ( elem != 0xe0dd ) && ( elem != 0xe000 ) ) )
       {
          long filePosition = Fp->tellg();
-         gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag on :" 
+         gdcmWarningMacro( "Neither an Item tag nor a Sequence delimiter tag on :" 
            << std::hex << group << " , " << elem 
            << ") -before- position x(" << filePosition << ")" );
   
@@ -1617,7 +1617,7 @@ void Document::FixDocEntryFoundLength(DocEntry *entry,
      
    if ( foundLength % 2)
    {
-      gdcmVerboseMacro( "Warning : Tag with uneven length " << foundLength 
+      gdcmWarningMacro( "Warning : Tag with uneven length " << foundLength 
         <<  " in x(" << std::hex << gr << "," << elem <<")");
    }
       
@@ -1700,7 +1700,7 @@ bool Document::IsDocEntryAnInteger(DocEntry *entry)
          // encounter such an ill-formed image, we simply display a warning
          // message and proceed on parsing (while crossing fingers).
          long filePosition = Fp->tellg();
-         gdcmVerboseMacro( "Erroneous Group Length element length  on : (" 
+         gdcmWarningMacro( "Erroneous Group Length element length  on : (" 
            << std::hex << group << " , " << elem
            << ") -before- position x(" << filePosition << ")"
            << "lgt : " << length );
@@ -1754,7 +1754,7 @@ bool Document::CheckSwap()
    char *entCur = deb + 128;
    if( memcmp(entCur, "DICM", (size_t)4) == 0 )
    {
-      gdcmVerboseMacro( "Looks like DICOM Version3 (preamble + DCM)" );
+      gdcmWarningMacro( "Looks like DICOM Version3 (preamble + DCM)" );
       
       // Group 0002 should always be VR, and the first element 0000
       // Let's be carefull (so many wrong headers ...)
@@ -1786,24 +1786,24 @@ bool Document::CheckSwap()
       // instead of just checking for UL, OB and UI !? group 0000 
       {
          Filetype = ExplicitVR;
-         gdcmVerboseMacro( "Group 0002 : Explicit Value Representation");
+         gdcmWarningMacro( "Group 0002 : Explicit Value Representation");
       } 
       else 
       {
          Filetype = ImplicitVR;
-         gdcmVerboseMacro( "Group 0002 :Not an explicit Value Representation;"
+         gdcmWarningMacro( "Group 0002 :Not an explicit Value Representation;"
                         << "Looks like a bugged Header!");
       }
       
       if ( net2host )
       {
          SwapCode = 4321;
-         gdcmVerboseMacro( "HostByteOrder != NetworkByteOrder");
+         gdcmWarningMacro( "HostByteOrder != NetworkByteOrder");
       }
       else 
       {
          SwapCode = 1234;
-         gdcmVerboseMacro( "HostByteOrder = NetworkByteOrder");
+         gdcmWarningMacro( "HostByteOrder = NetworkByteOrder");
       }
       
       // Position the file position indicator at first tag 
@@ -1816,7 +1816,7 @@ bool Document::CheckSwap()
    // Alas, this is not a DicomV3 file and whatever happens there is no file
    // preamble. We can reset the file position indicator to where the data
    // is (i.e. the beginning of the file).
-   gdcmVerboseMacro( "Not a DICOM Version3 file");
+   gdcmWarningMacro( "Not a DICOM Version3 file");
    Fp->seekg(0, std::ios::beg);
 
    // Our next best chance would be to be considering a 'clean' ACR/NEMA file.
@@ -1891,7 +1891,7 @@ bool Document::CheckSwap()
                Filetype = ACR;
                return true;
             default :
-               gdcmVerboseMacro( "ACR/NEMA unfound swap info (Really hopeless !)");
+               gdcmWarningMacro( "ACR/NEMA unfound swap info (Really hopeless !)");
                Filetype = Unknown;
                return false;
          }
@@ -1903,7 +1903,7 @@ bool Document::CheckSwap()
  */
 void Document::SwitchByteSwapCode() 
 {
-   gdcmVerboseMacro( "Switching Byte Swap code from "<< SwapCode);
+   gdcmWarningMacro( "Switching Byte Swap code from "<< SwapCode);
    if ( SwapCode == 1234 ) 
    {
       SwapCode = 4321;
@@ -2020,7 +2020,7 @@ DocEntry *Document::ReadNextDocEntry()
             std::string msg;
             msg = Util::Format("Entry (%04x,%04x) should be Explicit VR\n", 
                           newEntry->GetGroup(), newEntry->GetElement());
-            gdcmVerboseMacro( msg.c_str() );
+            gdcmWarningMacro( msg.c_str() );
           }
       }
       newEntry->SetImplicitVR();
@@ -2088,7 +2088,7 @@ void Document::HandleOutOfGroup0002(uint16_t &group, uint16_t &elem)
       std::string ts = GetTransferSyntax();
       if ( !Global::GetTS()->IsTransferSyntax(ts) )
       {
-         gdcmVerboseMacro("True DICOM File, with NO Tansfer Syntax: " << ts );
+         gdcmWarningMacro("True DICOM File, with NO Tansfer Syntax: " << ts );
          return;
       }
 
@@ -2103,7 +2103,7 @@ void Document::HandleOutOfGroup0002(uint16_t &group, uint16_t &elem)
       //'Implicit VR Transfer Syntax (GE Private)
       if ( Global::GetTS()->GetSpecialTransferSyntax(ts) == TS::ExplicitVRBigEndian )
       {
-         gdcmVerboseMacro("Transfer Syntax Name = [" 
+         gdcmWarningMacro("Transfer Syntax Name = [" 
                         << GetTransferSyntaxName() << "]" );
          SwitchByteSwapCode();
          group = SwapShort(group);
index 7982e616a1866340083671a09cf7c99a608fb640..9b8becbaa52cae97612b83cc87747cfb95be99c6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 23:49:23 $
-  Version:   $Revision: 1.55 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.56 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -72,7 +72,7 @@ bool ElementSet::AddEntry(DocEntry *newEntry)
 
    if( TagHT.count(key) == 1 )
    {
-      gdcmVerboseMacro( "Key already present: " << key.c_str());
+      gdcmWarningMacro( "Key already present: " << key.c_str());
       return false;
    }
    else
@@ -92,12 +92,12 @@ bool ElementSet::RemoveEntry( DocEntry *entryToRemove)
    if( TagHT.count(key) == 1 )
    {
       TagHT.erase(key);
-      //gdcmVerboseMacro( "One element erased.");
+      //gdcmWarningMacro( "One element erased.");
       delete entryToRemove;
       return true;
    }
 
-   gdcmVerboseMacro( "Key not present");
+   gdcmWarningMacro( "Key not present");
    return false ;
 }
 
@@ -111,11 +111,11 @@ bool ElementSet::RemoveEntryNoDestroy(DocEntry *entryToRemove)
    if( TagHT.count(key) == 1 )
    {
       TagHT.erase(key);
-      //gdcmVerboseMacro( "One element erased.");
+      //gdcmWarningMacro( "One element erased.");
       return true;
    }
 
-   gdcmVerboseMacro( "Key not present");
+   gdcmWarningMacro( "Key not present");
    return false ;
 }
 
index ac3b4707f4d64010806a3bbd19ba81e912bbcd6d..d0d166b470598c9e839bf06f784d81f2837ea87e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 01:31:36 $
-  Version:   $Revision: 1.211 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.212 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -371,7 +371,7 @@ float File::GetXSpacing()
 
    if ( strSpacing == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Unfound Pixel Spacing (0028,0030)" );
+      gdcmWarningMacro( "Unfound Pixel Spacing (0028,0030)" );
       return 1.;
    }
 
@@ -398,7 +398,7 @@ float File::GetXSpacing()
 
    if ( xspacing == 0.)
    {
-      gdcmVerboseMacro("gdcmData/CT-MONO2-8-abdo.dcm problem");
+      gdcmWarningMacro("gdcmData/CT-MONO2-8-abdo.dcm problem");
       // seems to be a bug in the header ...
       nbValues = sscanf( strSpacing.c_str(), "%f\\0\\%f", &yspacing, &xspacing);
       gdcmAssertMacro( nbValues == 2 );
@@ -419,7 +419,7 @@ float File::GetYSpacing()
   
    if ( strSpacing == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro("Unfound Pixel Spacing (0028,0030)");
+      gdcmWarningMacro("Unfound Pixel Spacing (0028,0030)");
       return 1.;
     }
 
@@ -454,11 +454,11 @@ float File::GetZSpacing()
 
    if ( strSpacingBSlices == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro("Unfound Spacing Between Slices (0018,0088)");
+      gdcmWarningMacro("Unfound Spacing Between Slices (0018,0088)");
       const std::string &strSliceThickness = GetEntryValue(0x0018,0x0050);       
       if ( strSliceThickness == GDCM_UNFOUND )
       {
-         gdcmVerboseMacro("Unfound Slice Thickness (0018,0050)");
+         gdcmWarningMacro("Unfound Slice Thickness (0018,0050)");
          return 1.;
       }
       else
@@ -487,11 +487,11 @@ float File::GetXOrigin()
 
    if ( strImPos == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
+      gdcmWarningMacro( "Unfound Image Position Patient (0020,0032)");
       strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
       if ( strImPos == GDCM_UNFOUND )
       {
-         gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
+         gdcmWarningMacro( "Unfound Image Position (RET) (0020,0030)");
          return 0.;
       }
    }
@@ -517,11 +517,11 @@ float File::GetYOrigin()
 
    if ( strImPos == GDCM_UNFOUND)
    {
-      gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
+      gdcmWarningMacro( "Unfound Image Position Patient (0020,0032)");
       strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
       if ( strImPos == GDCM_UNFOUND )
       {
-         gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
+         gdcmWarningMacro( "Unfound Image Position (RET) (0020,0030)");
          return 0.;
       }  
    }
@@ -551,7 +551,7 @@ float File::GetZOrigin()
    {
       if( sscanf( strImPos.c_str(), "%f\\%f\\%f", &xImPos, &yImPos, &zImPos) != 3)
       {
-         gdcmVerboseMacro( "Wrong Image Position Patient (0020,0032)");
+         gdcmWarningMacro( "Wrong Image Position Patient (0020,0032)");
          return 0.;  // bug in the element 0x0020,0x0032
       }
       else
@@ -566,7 +566,7 @@ float File::GetZOrigin()
       if( sscanf( strImPos.c_str(), 
           "%f\\%f\\%f", &xImPos, &yImPos, &zImPos ) != 3 )
       {
-         gdcmVerboseMacro( "Wrong Image Position (RET) (0020,0030)");
+         gdcmWarningMacro( "Wrong Image Position (RET) (0020,0030)");
          return 0.;  // bug in the element 0x0020,0x0032
       }
       else
@@ -580,7 +580,7 @@ float File::GetZOrigin()
    {
       if( sscanf( strSliceLocation.c_str(), "%f", &zImPos) != 1)
       {
-         gdcmVerboseMacro( "Wrong Slice Location (0020,1041)");
+         gdcmWarningMacro( "Wrong Slice Location (0020,1041)");
          return 0.;  // bug in the element 0x0020,0x1041
       }
       else
@@ -588,14 +588,14 @@ float File::GetZOrigin()
          return zImPos;
       }
    }
-   gdcmVerboseMacro( "Unfound Slice Location (0020,1041)");
+   gdcmWarningMacro( "Unfound Slice Location (0020,1041)");
 
    std::string strLocation = GetEntryValue(0x0020,0x0050);
    if ( strLocation != GDCM_UNFOUND )
    {
       if( sscanf( strLocation.c_str(), "%f", &zImPos) != 1)
       {
-         gdcmVerboseMacro( "Wrong Location (0020,0050)");
+         gdcmWarningMacro( "Wrong Location (0020,0050)");
          return 0.;  // bug in the element 0x0020,0x0050
       }
       else
@@ -603,7 +603,7 @@ float File::GetZOrigin()
          return zImPos;
       }
    }
-   gdcmVerboseMacro( "Unfound Location (0020,0050)");  
+   gdcmWarningMacro( "Unfound Location (0020,0050)");  
 
    return 0.; // Hopeless
 }
@@ -626,7 +626,7 @@ void File::GetImageOrientationPatient( float iop[6] )
       if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
       {
-         gdcmVerboseMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." );
+         gdcmWarningMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." );
       }
    }
    //For ACR-NEMA
@@ -636,7 +636,7 @@ void File::GetImageOrientationPatient( float iop[6] )
       if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
       {
-         gdcmVerboseMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." );
+         gdcmWarningMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." );
       }
    }
 }
@@ -652,7 +652,7 @@ int File::GetBitsStored()
    std::string strSize = GetEntryValue( 0x0028, 0x0101 );
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro("(0028,0101) is supposed to be mandatory");
+      gdcmWarningMacro("(0028,0101) is supposed to be mandatory");
       return 0;  // It's supposed to be mandatory
                  // the caller will have to check
    }
@@ -670,7 +670,7 @@ int File::GetBitsAllocated()
    std::string strSize = GetEntryValue(0x0028,0x0100);
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "(0028,0100) is supposed to be mandatory");
+      gdcmWarningMacro( "(0028,0100) is supposed to be mandatory");
       return 0; // It's supposed to be mandatory
                 // the caller will have to check
    }
@@ -688,7 +688,7 @@ int File::GetHighBitPosition()
    std::string strSize = GetEntryValue( 0x0028, 0x0102 );
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "(0028,0102) is supposed to be mandatory");
+      gdcmWarningMacro( "(0028,0102) is supposed to be mandatory");
       return 0;
    }
    return atoi( strSize.c_str() );
@@ -705,7 +705,7 @@ int File::GetSamplesPerPixel()
    const std::string &strSize = GetEntryValue(0x0028,0x0002);
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "(0028,0002) is supposed to be mandatory");
+      gdcmWarningMacro( "(0028,0002) is supposed to be mandatory");
       return 1; // Well, it's supposed to be mandatory ...
                 // but sometimes it's missing : *we* assume Gray pixels
    }
@@ -722,7 +722,7 @@ int File::GetPlanarConfiguration()
    std::string strSize = GetEntryValue(0x0028,0x0006);
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Not found : Planar Configuration (0028,0006)");
+      gdcmWarningMacro( "Not found : Planar Configuration (0028,0006)");
       return 0;
    }
    return atoi( strSize.c_str() );
@@ -757,7 +757,7 @@ int File::GetPixelSize()
    {
       return 8;
    }
-   gdcmVerboseMacro( "Unknown pixel type");
+   gdcmWarningMacro( "Unknown pixel type");
    return 0;
 }
 
@@ -780,7 +780,7 @@ std::string File::GetPixelType()
    std::string bitsAlloc = GetEntryValue(0x0028, 0x0100); // Bits Allocated
    if ( bitsAlloc == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Missing  Bits Allocated (0028,0100)");
+      gdcmWarningMacro( "Missing  Bits Allocated (0028,0100)");
       bitsAlloc = "16"; // default and arbitrary value, not to polute the output
    }
 
@@ -803,7 +803,7 @@ std::string File::GetPixelType()
 
    if (sign == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Missing Pixel Representation (0028,0103)");
+      gdcmWarningMacro( "Missing Pixel Representation (0028,0103)");
       sign = "U"; // default and arbitrary value, not to polute the output
    }
    else if ( sign == "0" )
@@ -828,7 +828,7 @@ bool File::IsSignedPixelData()
    std::string strSize = GetEntryValue( 0x0028, 0x0103 );
    if ( strSize == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "(0028,0103) is supposed to be mandatory");
+      gdcmWarningMacro( "(0028,0103) is supposed to be mandatory");
       return false;
    }
    int sign = atoi( strSize.c_str() );
@@ -854,7 +854,7 @@ bool File::IsMonochrome()
    }
    if ( PhotometricInterp == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Not found : Photometric Interpretation (0028,0004)");
+      gdcmWarningMacro( "Not found : Photometric Interpretation (0028,0004)");
    }
    return false;
 }
@@ -873,7 +873,7 @@ bool File::IsPaletteColor()
    }
    if ( PhotometricInterp == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Not found : Palette color (0028,0004)");
+      gdcmWarningMacro( "Not found : Palette color (0028,0004)");
    }
    return false;
 }
@@ -892,7 +892,7 @@ bool File::IsYBRFull()
    }
    if ( PhotometricInterp == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Not found : YBR Full (0028,0004)");
+      gdcmWarningMacro( "Not found : YBR Full (0028,0004)");
    }
    return false;
 }
@@ -990,7 +990,7 @@ float File::GetRescaleIntercept()
       if( sscanf( strRescInter.c_str(), "%f", &resInter) != 1 )
       {
          // bug in the element 0x0028,0x1052
-         gdcmVerboseMacro( "Rescale Intercept (0028,1052) is empty." );
+         gdcmWarningMacro( "Rescale Intercept (0028,1052) is empty." );
       }
    }
 
@@ -1011,7 +1011,7 @@ float File::GetRescaleSlope()
       if( sscanf( strRescSlope.c_str(), "%f", &resSlope) != 1)
       {
          // bug in the element 0x0028,0x1053
-         gdcmVerboseMacro( "Rescale Slope (0028,1053) is empty.");
+         gdcmWarningMacro( "Rescale Slope (0028,1053) is empty.");
       }
    }
 
@@ -1225,7 +1225,7 @@ bool File::Write(std::string fileName, FileType filetype)
                                          std::ios::out | std::ios::binary);
    if (*fp == NULL)
    {
-      gdcmVerboseMacro("Failed to open (write) File: " << fileName.c_str());
+      gdcmWarningMacro("Failed to open (write) File: " << fileName.c_str());
       return false;
    }
 
@@ -1472,7 +1472,7 @@ void File::ComputeRLEInfo()
       if ( nbRleSegments > 16 )
       {
          // There should be at most 15 segments (refer to RLEFrame class)
-         gdcmVerboseMacro( "Too many segments.");
+         gdcmWarningMacro( "Too many segments.");
       }
  
       uint32_t rleSegmentOffsetTable[16];
@@ -1515,7 +1515,7 @@ void File::ComputeRLEInfo()
    // Delimiter Item':
    if ( !ReadTag(0xfffe, 0xe0dd) )
    {
-      gdcmVerboseMacro( "No sequence delimiter item at end of RLE item sequence");
+      gdcmWarningMacro( "No sequence delimiter item at end of RLE item sequence");
    }
 }
 
@@ -1556,7 +1556,7 @@ void File::ComputeJPEGFragmentInfo()
    // Delimiter Item':
    if ( !ReadTag(0xfffe, 0xe0dd) )
    {
-      gdcmVerboseMacro( "No sequence delimiter item at end of JPEG item sequence");
+      gdcmWarningMacro( "No sequence delimiter item at end of JPEG item sequence");
    }
 }
 
@@ -1594,7 +1594,7 @@ bool File::ReadTag(uint16_t testGroup, uint16_t testElement)
    }
    if ( itemTagGroup != testGroup || itemTagElement != testElement )
    {
-      gdcmVerboseMacro( "Wrong Item Tag found:"
+      gdcmWarningMacro( "Wrong Item Tag found:"
        << "   We should have found tag ("
        << std::hex << testGroup << "," << testElement << ")" << std::endl
        << "   but instead we encountered tag ("
@@ -1634,7 +1634,7 @@ uint32_t File::ReadTagLength(uint16_t testGroup, uint16_t testElement)
    long currentPosition = Fp->tellg();
    uint32_t itemLength  = ReadInt32();
    {
-      gdcmVerboseMacro( "Basic Item Length is: "
+      gdcmWarningMacro( "Basic Item Length is: "
         << itemLength << std::endl
         << "  at address: " << std::hex << (unsigned int)currentPosition);
    }
@@ -1666,7 +1666,7 @@ void File::ReadAndSkipEncapsulatedBasicOffsetTable()
       {
          uint32_t individualLength = str2num( &basicOffsetTableItemValue[i],
                                               uint32_t);
-         gdcmVerboseMacro( "Read one length: " << 
+         gdcmWarningMacro( "Read one length: " << 
                           std::hex << individualLength );
       }
 #endif //GDCM_DEBUG
index bde7e0f936c1511c7ffaf8411c4a6e0c8239e8c7..700904b6f7204164494e3e04207d10663c987ea7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 14:49:01 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -320,7 +320,7 @@ size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
    {
       if ( PixelReadConverter->GetRGBSize() > maxSize )
       {
-         gdcmVerboseMacro( "Pixel data bigger than caller's expected MaxSize");
+         gdcmWarningMacro( "Pixel data bigger than caller's expected MaxSize");
          return 0;
       }
       memcpy( destination,
@@ -332,7 +332,7 @@ size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
    // Either no LUT conversion necessary or LUT conversion failed
    if ( PixelReadConverter->GetRawSize() > maxSize )
    {
-      gdcmVerboseMacro( "Pixel data bigger than caller's expected MaxSize");
+      gdcmWarningMacro( "Pixel data bigger than caller's expected MaxSize");
       return 0;
    }
    memcpy( destination,
@@ -450,7 +450,7 @@ bool FileHelper::WriteRawData(std::string const &fileName)
   std::ofstream fp1(fileName.c_str(), std::ios::out | std::ios::binary );
    if (!fp1)
    {
-      gdcmVerboseMacro( "Fail to open (write) file:" << fileName.c_str());
+      gdcmWarningMacro( "Fail to open (write) file:" << fileName.c_str());
       return false;
    }
 
@@ -635,7 +635,7 @@ bool FileHelper::CheckWriteIntegrity()
          case WMODE_RAW :
             if( decSize!=PixelWriteConverter->GetUserDataSize() )
             {
-               gdcmVerboseMacro( "Data size (Raw) is incorrect. Should be " 
+               gdcmWarningMacro( "Data size (Raw) is incorrect. Should be " 
                            << decSize << " / Found :" 
                            << PixelWriteConverter->GetUserDataSize() );
                return false;
@@ -644,7 +644,7 @@ bool FileHelper::CheckWriteIntegrity()
          case WMODE_RGB :
             if( rgbSize!=PixelWriteConverter->GetUserDataSize() )
             {
-               gdcmVerboseMacro( "Data size (RGB) is incorrect. Should be " 
+               gdcmWarningMacro( "Data size (RGB) is incorrect. Should be " 
                           << decSize << " / Found " 
                           << PixelWriteConverter->GetUserDataSize() );
                return false;
@@ -982,7 +982,7 @@ uint8_t *FileHelper::GetRaw()
       raw = PixelReadConverter->GetRaw();
       if ( ! raw )
       {
-         gdcmVerboseMacro( "Read/decompress of pixel data apparently went wrong.");
+         gdcmWarningMacro( "Read/decompress of pixel data apparently went wrong.");
          return 0;
       }
    }
index 6411383e263f1013340426c33d55824ff3a8f6cf..0e737e4475755d622f4e759b0ed0fbef4ce26067 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmGlobal.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/02/05 01:37:08 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -60,7 +60,7 @@ Global::Global()
 {
    if (ValRes || TranSyn || Dicts || ddElem)
    {
-      gdcmVerboseMacro( "VR or TS or Dicts already allocated");
+      gdcmWarningMacro( "VR or TS or Dicts already allocated");
       return;
    }
    Dicts   = new DictSet();
index 9c28c17c1e2804343b66cb956e870fda21b2f2f3..69f334b5ad2c86e1cc8afcaec349c154b19a898e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpeg2000.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 01:31:36 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -35,7 +35,7 @@ namespace gdcm
 
 bool gdcm_read_JPEG2000_file (std::ifstream* , void* )
 {
-   gdcmVerboseMacro( "Sorry JPEG 2000 File not yet taken into account" );
+   gdcmWarningMacro( "Sorry JPEG 2000 File not yet taken into account" );
    return false;
 }
 
index e8726d5e1151c546e90394b3f8e50fcc739dd991..a850d3593b4f4613df554bf991bd8c0c6569c5a4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpegLS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 01:31:36 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -36,7 +36,7 @@ namespace gdcm
 
 bool gdcm_read_JPEGLS_file (std::ifstream* , void* )
 {
-   gdcmVerboseMacro( "Sorry JPEG-LS File not yet taken into account" );
+   gdcmWarningMacro( "Sorry JPEG-LS File not yet taken into account" );
    return false;
 }
 } // end namespace gdcm
index 18315f101dcacb92377bd29a1a0bbf61ceda0549..78075ab2a940da5e70cb2ff968c48d7e95d2e5b9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 16:51:36 $
-  Version:   $Revision: 1.48 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.49 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -160,7 +160,7 @@ void PixelReadConvert::GrabInformationsFromFile( File *file )
       LutRedData = (uint8_t*)file->GetEntryBinArea( 0x0028, 0x1201 );
       if ( ! LutRedData )
       {
-         gdcmVerboseMacro( "Unable to read Red LUT data" );
+         gdcmWarningMacro( "Unable to read Red LUT data" );
       }
 
       // //// Green round:
@@ -168,7 +168,7 @@ void PixelReadConvert::GrabInformationsFromFile( File *file )
       LutGreenData = (uint8_t*)file->GetEntryBinArea(0x0028, 0x1202 );
       if ( ! LutGreenData)
       {
-         gdcmVerboseMacro( "Unable to read Green LUT data" );
+         gdcmWarningMacro( "Unable to read Green LUT data" );
       }
 
       // //// Blue round:
@@ -176,7 +176,7 @@ void PixelReadConvert::GrabInformationsFromFile( File *file )
       LutBlueData = (uint8_t*)file->GetEntryBinArea( 0x0028, 0x1203 );
       if ( ! LutBlueData )
       {
-         gdcmVerboseMacro( "Unable to read Blue LUT data" );
+         gdcmWarningMacro( "Unable to read Blue LUT data" );
       }
    }
 
@@ -195,14 +195,14 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
    //// First stage: get our hands on the Pixel Data.
    if ( !fp )
    {
-      gdcmVerboseMacro( "Unavailable file pointer." );
+      gdcmWarningMacro( "Unavailable file pointer." );
       return false;
    }
 
    fp->seekg( PixelOffset, std::ios::beg );
    if( fp->fail() || fp->eof())
    {
-      gdcmVerboseMacro( "Unable to find PixelOffset in file." );
+      gdcmWarningMacro( "Unable to find PixelOffset in file." );
       return false;
    }
 
@@ -222,7 +222,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
       // variable). But RawSize is the right size of the image !
       if( PixelDataLength != RawSize)
       {
-         gdcmVerboseMacro( "Mismatch between PixelReadConvert : "
+         gdcmWarningMacro( "Mismatch between PixelReadConvert : "
                             << PixelDataLength << " and RawSize : " << RawSize );
       }
       if( PixelDataLength > RawSize)
@@ -236,7 +236,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
 
       if ( fp->fail() || fp->eof())
       {
-         gdcmVerboseMacro( "Reading of Raw pixel data failed." );
+         gdcmWarningMacro( "Reading of Raw pixel data failed." );
          return false;
       }
    } 
@@ -244,7 +244,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
    {
       if ( ! RLEInfo->DecompressRLEFile( fp, Raw, XSize, YSize, ZSize, BitsAllocated ) )
       {
-         gdcmVerboseMacro( "RLE decompressor failed." );
+         gdcmWarningMacro( "RLE decompressor failed." );
          return false;
       }
    }
@@ -253,7 +253,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
       // Default case concerns JPEG family
       if ( ! ReadAndDecompressJPEGFile( fp ) )
       {
-         gdcmVerboseMacro( "JPEG decompressor failed." );
+         gdcmWarningMacro( "JPEG decompressor failed." );
          return false;
       }
    }
@@ -383,7 +383,7 @@ bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstream *fp )
 {
    if ( IsJPEG2000 )
    {
-      gdcmVerboseMacro( "Sorry, JPEG2000 not yet taken into account" );
+      gdcmWarningMacro( "Sorry, JPEG2000 not yet taken into account" );
       fp->seekg( JPEGInfo->GetFirstFragment()->GetOffset(), std::ios::beg);
 //    if ( ! gdcm_read_JPEG2000_file( fp,Raw ) )
           return false;
@@ -391,7 +391,7 @@ bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstream *fp )
 
    if ( IsJPEGLS )
    {
-      gdcmVerboseMacro( "Sorry, JPEG-LS not yet taken into account" );
+      gdcmWarningMacro( "Sorry, JPEG-LS not yet taken into account" );
       fp->seekg( JPEGInfo->GetFirstFragment()->GetOffset(), std::ios::beg);
 //    if ( ! gdcm_read_JPEGLS_file( fp,Raw ) )
          return false;
@@ -452,7 +452,7 @@ void PixelReadConvert::BuildLUTRGBA()
                         &lengthR, &debR, &nbitsR );
    if( nbRead != 3 )
    {
-      gdcmVerboseMacro( "Wrong Red LUT descriptor" );
+      gdcmWarningMacro( "Wrong Red LUT descriptor" );
    }
                                                                                 
    int lengthG;  // Green LUT length in Bytes
@@ -463,7 +463,7 @@ void PixelReadConvert::BuildLUTRGBA()
                     &lengthG, &debG, &nbitsG );
    if( nbRead != 3 )
    {
-      gdcmVerboseMacro( "Wrong Green LUT descriptor" );
+      gdcmWarningMacro( "Wrong Green LUT descriptor" );
    }
                                                                                 
    int lengthB;  // Blue LUT length in Bytes
@@ -474,7 +474,7 @@ void PixelReadConvert::BuildLUTRGBA()
                     &lengthB, &debB, &nbitsB );
    if( nbRead != 3 )
    {
-      gdcmVerboseMacro( "Wrong Blue LUT descriptor" );
+      gdcmWarningMacro( "Wrong Blue LUT descriptor" );
    }
                                                                                 
    ////////////////////////////////////////////////////////
@@ -563,7 +563,7 @@ void PixelReadConvert::ConvertSwapZone()
             }
             break;
          default:
-            gdcmVerboseMacro("SwapCode value (16 bits) not allowed.");
+            gdcmWarningMacro("SwapCode value (16 bits) not allowed.");
       }
    }
    else if( BitsAllocated == 32 )
@@ -608,7 +608,7 @@ void PixelReadConvert::ConvertSwapZone()
             }
             break;
          default:
-            gdcmVerboseMacro("SwapCode value (32 bits) not allowed." );
+            gdcmWarningMacro("SwapCode value (32 bits) not allowed." );
       }
    }
 }
@@ -674,7 +674,7 @@ bool PixelReadConvert::ConvertReArrangeBits() throw ( FormatError )
       }
       else
       {
-         gdcmVerboseMacro("Weird image");
+         gdcmWarningMacro("Weird image");
          throw FormatError( "Weird image !?" );
       }
    }
@@ -903,7 +903,7 @@ void PixelReadConvert::Print( std::ostream &os, std::string const &indent )
       }
       else
       {
-         gdcmVerboseMacro("Set as RLE file but NO RLEinfo present.");
+         gdcmWarningMacro("Set as RLE file but NO RLEinfo present.");
       }
    }
 
@@ -915,7 +915,7 @@ void PixelReadConvert::Print( std::ostream &os, std::string const &indent )
       }
       else
       {
-         gdcmVerboseMacro("Set as JPEG file but NO JPEGinfo present.");
+         gdcmWarningMacro("Set as JPEG file but NO JPEGinfo present.");
       }
    }
 }
index 99a7f7187fb5c568a918d59eaa394a2a6d885725..9e4e0040b2e9fd24b0e003f3b740d963fa9520ec 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLEFrame.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 13:00:16 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -120,7 +120,7 @@ bool RLEFrame::ReadAndDecompressRLEFragment( uint8_t *subRaw,
                                                                                 
       if ( numberOfReadBytes > fragmentSize )
       {
-         gdcmVerboseMacro( "Read more bytes than the segment size.");
+         gdcmWarningMacro( "Read more bytes than the segment size.");
          return false;
       }
    }
index c4af8e33be42709c3053d26ac523e548161f133c..7316a268b2f8e512c849281b91e9af3aeb295a40 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 23:49:23 $
-  Version:   $Revision: 1.68 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.69 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -150,12 +150,12 @@ bool SQItem::RemoveEntry( DocEntry *entryToRemove )
       if( *it == entryToRemove )
       {
          DocEntries.erase(it);
-         gdcmVerboseMacro( "One element erased: " << entryToRemove->GetKey() );
+         gdcmWarningMacro( "One element erased: " << entryToRemove->GetKey() );
          delete entryToRemove;
          return true;
       }
    }
-   gdcmVerboseMacro( "Entry not found: " << entryToRemove->GetKey() );
+   gdcmWarningMacro( "Entry not found: " << entryToRemove->GetKey() );
    return false ;
 }
 
@@ -173,13 +173,13 @@ bool SQItem::RemoveEntryNoDestroy(DocEntry *entryToRemove)
       if( *it == entryToRemove )
       {
          DocEntries.erase(it);
-         gdcmVerboseMacro( "One element erased, no destroyed: "
+         gdcmWarningMacro( "One element erased, no destroyed: "
                             << entryToRemove->GetKey() );
          return true;
       }
    }
                                                                                 
-   gdcmVerboseMacro( "Entry not found:" << entryToRemove->GetKey() );
+   gdcmWarningMacro( "Entry not found:" << entryToRemove->GetKey() );
    return false ;
 }
                                                                                 
index ace2fa4611b30bd0f2fcd34a3b757ca7bbf7db8a..11033cdbab0e9bb284ac21db73f06a5354710864 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:49 $
-  Version:   $Revision: 1.53 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.54 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -240,7 +240,7 @@ void SeqEntry::Print( std::ostream &os, std::string const & )
       else 
       {
          // fuse
-         gdcmVerboseMacro("  -------- should have a sequence terminator item");
+         gdcmWarningMacro("  -------- should have a sequence terminator item");
       }
    }
 }
index f9fd686322cf17cdca35266b186bb823425662b7..f0dcdca3366dad1813b5ed90a56903ad257ceb7a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 01:25:03 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -96,7 +96,7 @@ void SerieHelper::AddFileName(std::string const &filename)
 
       if ( CoherentGdcmFileListHT.count(uid) == 0 )
       {
-         gdcmVerboseMacro(" New Serie UID :[" << uid << "]");
+         gdcmWarningMacro(" New Serie UID :[" << uid << "]");
          // create a std::list in 'uid' position
          CoherentGdcmFileListHT[uid] = new GdcmFileList;
       }
@@ -105,7 +105,7 @@ void SerieHelper::AddFileName(std::string const &filename)
    }
    else
    {
-      gdcmVerboseMacro("Could not read file: " << filename );
+      gdcmWarningMacro("Could not read file: " << filename );
       delete header;
    }
 }
@@ -305,7 +305,7 @@ bool SerieHelper::ImagePositionPatientOrdering( GdcmFileList *fileList )
          CoherentGdcmFileVector[pos] = *it2;
       else
       {
-         gdcmVerboseMacro( "2 files same position");
+         gdcmWarningMacro( "2 files same position");
          return false;
       }
    }
@@ -389,7 +389,7 @@ void SerieHelper::Print(std::ostream &os, std::string const & indent)
    CoherentFileListmap::iterator itl = CoherentGdcmFileListHT.begin();
    if ( itl == CoherentGdcmFileListHT.end() )
    {
-      gdcmVerboseMacro( "No Coherent File list found" );
+      gdcmWarningMacro( "No Coherent File list found" );
       return;
    }
    while (itl != CoherentGdcmFileListHT.end())
index b8a3da10795b541e10e880650d5e8c4b3331ba96..190c151e03f7c451758cbbc73870df506f756a98 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.42 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -84,7 +84,7 @@ TS::TS()
    std::ifstream from(filename.c_str());
    if( !from )
    {
-      gdcmVerboseMacro("Can't open dictionary" << filename.c_str());
+      gdcmWarningMacro("Can't open dictionary" << filename.c_str());
       FillDefaultTSDict( TsMap );
    }
    else
index 8ff06805e1d29ddf98b94ff4ea847c0986bea01b..d51514cc332c2c742e8d6fda7df13571e68a6190 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 18:13:57 $
-  Version:   $Revision: 1.131 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.132 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -748,7 +748,7 @@ std::string Util::GetMACAddress()
    }
    else
    {
-      gdcmVerboseMacro("Problem in finding the MAC Address");
+      gdcmWarningMacro("Problem in finding the MAC Address");
       return "";
    }
 }
index bd179cf8538ea9334018a94dcf5e243bbe646c48..a1936d0eb375e4c8281a54939d7517b08c3529b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:56 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2005/02/05 01:37:09 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,7 +40,7 @@ VR::VR()
    std::ifstream from(filename.c_str());
    if(!from)
    {
-      gdcmVerboseMacro("Can't open dictionary" << filename.c_str());
+      gdcmWarningMacro("Can't open dictionary" << filename.c_str());
       FillDefaultVRDict(vr);
    }
    else
index 6b40565637dfc21eaad753d1f3e4a8288a880fe9..547eb2fda4e889cbf3ffc48a33b8934003c1cd1f 100644 (file)
@@ -20,7 +20,7 @@
 /* Expanded data destination object for stdio output */
 
 extern "C" {
-  typedef  unsigned char(*uc_jpeg_compress_struct)(jpeg_compress_struct*);
+  typedef  boolean(*boolean_jpeg_compress_struct)(jpeg_compress_struct*);
   typedef  void(*void_jpeg_compress_struct)(jpeg_compress_struct*);
 }
 
@@ -165,7 +165,7 @@ jpeg_stdio_dest (j_compress_ptr cinfo, std::ofstream * outfile)
 
   dest = (my_dest_ptr) cinfo->dest;
   dest->pub.init_destination = reinterpret_cast<void_jpeg_compress_struct>(init_destination);
-  dest->pub.empty_output_buffer = reinterpret_cast<uc_jpeg_compress_struct>(empty_output_buffer);
+  dest->pub.empty_output_buffer = reinterpret_cast<boolean_jpeg_compress_struct>(empty_output_buffer);
   dest->pub.term_destination = reinterpret_cast<void_jpeg_compress_struct>(term_destination);
   dest->outfile = outfile;
 }
index 64a148d1dbc4f186e62d7ff1d429cdfb6cd5da98..53717cd5006b1ae246d6cc8b4b8576be511c1ffb 100644 (file)
@@ -19,7 +19,7 @@
 /* Expanded data source object for stdio input */
 
 extern "C" {
-  typedef  unsigned char(*uc_jpeg_decompress_struct)(jpeg_decompress_struct*);
+  typedef  boolean(*boolean_jpeg_decompress_struct)(jpeg_decompress_struct*);
   typedef  void(*void_jpeg_decompress_struct)(jpeg_decompress_struct*);
   typedef  void(*void_jpeg_decompress_struct_long)(jpeg_decompress_struct*,long);
 }
@@ -221,7 +221,7 @@ jpeg_stdio_src (j_decompress_ptr cinfo, std::ifstream * infile, gdcm::JPEGFragme
 
   src = (my_src_ptr) cinfo->src;
   src->pub.init_source = reinterpret_cast<void_jpeg_decompress_struct>(init_source);
-  src->pub.fill_input_buffer = reinterpret_cast<uc_jpeg_decompress_struct>(fill_input_buffer);
+  src->pub.fill_input_buffer = reinterpret_cast<boolean_jpeg_decompress_struct>(fill_input_buffer);
   src->pub.skip_input_data = reinterpret_cast<void_jpeg_decompress_struct_long>(skip_input_data);
   src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
   src->pub.term_source = reinterpret_cast<void_jpeg_decompress_struct>(term_source);