]> Creatis software - gdcm.git/commitdiff
* gdcmPython/testSuite.py checks on CR-MONO1-10-chest.dcm moved to
authorfrog <frog>
Mon, 2 Aug 2004 16:42:12 +0000 (16:42 +0000)
committerfrog <frog>
Mon, 2 Aug 2004 16:42:12 +0000 (16:42 +0000)
    gdcmData/TestAllEntryVerifyReference.txt
  * Test/TestAllEntryVerify.cxx is now effective (used allways return true)
  * src/gdcmDocument.[cxx|h]: constructors no longer use the bool
    exception_on_error parameter.
    - src/gdcmFile.[cxx|h], src/gdcmHeader.[cxx|h] changed accordingly,
    - vtk/vtkGdcmReader.cxx changed accordingly,
    - Example/*.cxx and Test/*.cxx changed accordingly.

20 files changed:
ChangeLog
Example/PrintDocument.cxx
Example/PrintFile.cxx
Example/PrintHeader.cxx
Example/TestWrite.cxx
Example/Write.cxx
Example/WriteRead.cxx
Testing/TestAllEntryVerify.cxx
Testing/TestAllReadCompareDicom.cxx
Testing/TestReadWriteReadCompare.cxx
gdcmPython/testSuite.py
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmFile.cxx
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmHeader.h
vtk/vtkGdcmReader.cxx

index 84ed0664eb362ff04076c3eac9f1a3ba87ff591b..94f4c4ec2176691b2574211ea2baccbb357f7fb8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,14 @@
   * src/gdcmException.h: introduced new gdcmFormatUnexpected class
     (gdcmFormatError now inherits from gdcmFormatUnexpected).
   * TODO updated
+  * gdcmPython/testSuite.py checks on CR-MONO1-10-chest.dcm moved to
+    gdcmData/TestAllEntryVerifyReference.txt
+  * Test/TestAllEntryVerify.cxx is now effective (used allways return true)
+  * src/gdcmDocument.[cxx|h]: constructors no longer use the bool
+    exception_on_error parameter.
+    - src/gdcmFile.[cxx|h], src/gdcmHeader.[cxx|h] changed accordingly,
+    - vtk/vtkGdcmReader.cxx changed accordingly,
+    - Example/*.cxx and Test/*.cxx changed accordingly.
 
 2004-07-06 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
   * src/gdcmDicomDir.cxx, gdcmDocEntrySet.cxx: removed inclusion of errno.h
index 85e4b2971b5f9a63478fcaa61fbe548cdc672bd1..09305c570d3ab7d1b486815b3e0937e9941cfb97 100644 (file)
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
    
-   e1= new gdcmHeader( fileName.c_str(), false );
+   e1= new gdcmHeader( fileName.c_str() );
 
    e1->SetPrintLevel(2);
    
index 0beeda3f4934603a86dad8eefa550fc6eba8c93a..ad890128ab1b86909b3487b072a98ad865fbab8b 100644 (file)
@@ -18,7 +18,7 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
    
-   e1= new gdcmHeader( fileName.c_str(), false );
+   e1= new gdcmHeader( fileName.c_str() );
 
    f1 = new gdcmFile(e1);
 
index be38cc4f1c82299405a0b4199645dcd50621e757..4b12529f23f36cccd6b72f23bcf53ffb85b99730 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
    
-   gdcmFile *e2 = new gdcmFile( fileName.c_str(), false );
+   gdcmFile *e2 = new gdcmFile( fileName.c_str() );
    gdcmHeader *e1 = e2->GetHeader();  
         
    if (argc > 2) {
index 402f7c684298e0e5e71e2be4753407dd3ea8f1cd..bbdf452f22b81704f8f88318fa6f3e3726f004de 100644 (file)
@@ -46,7 +46,7 @@ int main(int argc, char* argv[])
      
    toto = argv[1]; 
 
-   e1 = new gdcmHeader( toto.c_str(), false );
+   e1 = new gdcmHeader( toto.c_str() );
    if (!e1->IsReadable())
    {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
index 5f716bdbea58326166e8d764e8080e024602bc50..43e376870c193c597def1025a3378e7279d475bc 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char* argv[])
      
    toto = argv[1]; 
 
-   e1 = new gdcmHeader( toto.c_str(), false );
+   e1 = new gdcmHeader( toto.c_str() );
    if (!e1->IsReadable()) {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
        return 0;
index 48be008419142b52240abb1a56fa942a34670661..803d8e10ab3d5dbd5de3b6589a27ca868a202b43 100644 (file)
@@ -25,7 +25,7 @@ int main(int argc, char* argv[])
 
    std::cout << argv[1] << std::endl;
 
-   e1 = new gdcmHeader( toto, false );
+   e1 = new gdcmHeader( toto );
    if (!e1->IsReadable()) {
        std::cerr << "Sorry, " << toto <<"  not a Readable DICOM / ACR File"
                  <<std::endl;
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
 
 // --------------------- we read the written image
       
-   e2 = new gdcmHeader( zozo, false );
+   e2 = new gdcmHeader( zozo );
    if (!e2->IsReadable()) {
        std::cerr << "Sorry, " << zozo << " not a Readable DICOM / ACR File"  
                  <<std::endl;
index 6c86f298250bb089e32298ce4bc24be7dff25166..60c6e9a1dbdb896770ab9e3ae68bafcef84d53e9 100644 (file)
@@ -163,7 +163,7 @@ bool ReferenceFileParser::Check()
    {
       string fileName = DataPath + i->first;
       cout << Indent << "FileName: " << fileName << endl;
-      gdcmHeader* tested = new gdcmHeader( fileName.c_str(), false );
+      gdcmHeader* tested = new gdcmHeader( fileName.c_str() );
       if( !tested->IsReadable() )
       {
         cerr << Indent << "Image not gdcm compatible:"
@@ -205,7 +205,7 @@ bool ReferenceFileParser::Check()
       cout << Indent << "  OK" << endl;
    }
    cout << Indent << endl;
-   return true; //???
+   return true;
 }
 
 istream& ReferenceFileParser::eatwhite( istream& is )
@@ -612,30 +612,7 @@ int TestAllEntryVerify(int argc, char* argv[])
    Parser.Open(referenceFilename);
    Parser.SetDataPath(referenceDir);
    // Parser.Print();
-   Parser.Check();
-/*
-   int i = 0;
-   while( gdcmDataImages[i] != 0 )
-   {
-      string filename = GDCM_DATA_ROOT;
-      filename += "/";  //doh!
-      filename += gdcmDataImages[i++];
-   
-      cout << "   Testing: " << filename << endl;
-
-      gdcmHeader* tested = new gdcmHeader( filename.c_str(), false, true );
-      if( !tested->GetHeader()->IsReadable() )
-      {
-        cout << "      Image not gdcm compatible:"
-                  << filename << endl;
-        delete tested;
-        return 1;
-      }
-
-      //////////////// Clean up:
-      delete tested;
-   }
-*/
-
-   return 0;
+   if ( Parser.Check() )
+      return 0;
+   return 1;
 }
index 009add4051bee79da7337b628a6b10059629fcb8..d94cd52d347bcefea3bb283d7c65706c242366ad 100644 (file)
@@ -8,7 +8,7 @@ int InternalTest(std::string const & filename, std::string const & referenceFile
 {
       std::cout << "   Testing: " << filename << std::endl;
 
-      gdcmFile* tested = new gdcmFile( filename, false );
+      gdcmFile* tested = new gdcmFile( filename );
       if( !tested->GetHeader()->IsReadable() )
       {
         std::cout << "      Image not gdcm compatible:"
@@ -44,7 +44,7 @@ int InternalTest(std::string const & filename, std::string const & referenceFile
 
       ////// When reference file is not gdcm readable test is failed:
   
-      gdcmFile* reference = new gdcmFile( referenceFileName.c_str(), false );
+      gdcmFile* reference = new gdcmFile( referenceFileName.c_str() );
       if( !reference->GetHeader()->IsReadable() )
       {
          std::cout << "      Reference image " << std::endl
index ed14c08a0d9c53575e80e8033ab2b1b4744bb348..3d035230c244fb40632bd5dfff77a9c0ed7b3707 100644 (file)
@@ -39,7 +39,7 @@ int TestReadWriteReadCompare(int argc, char* argv[])
 
       //////////////// Step 1 (see above description):
 
-      gdcmHeader *header = new gdcmHeader( filename, false );
+      gdcmHeader *header = new gdcmHeader( filename );
       if( !header->IsReadable() )
       {
          std::cerr << "Test::TestReadWriteReadCompare: Image not gdcm compatible:"
@@ -74,7 +74,7 @@ int TestReadWriteReadCompare(int argc, char* argv[])
     
       //////////////// Step 3:
 
-      gdcmFile* reread = new gdcmFile( "TestReadWriteReadCompare.dcm", false );
+      gdcmFile* reread = new gdcmFile( "TestReadWriteReadCompare.dcm" );
       if( !reread->GetHeader()->IsReadable() )
       {
         std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
index 8ef87055b1993898d845c4e1d7d2f5d8cf614f93..8dcc6007f1fa3bba861f1a4d89bd10666aa03e28 100644 (file)
@@ -12,37 +12,8 @@ class gdcmTestCase(unittest.TestCase):
    # http://www.barre.nom.fr/medical/samples/index.html
    BarreFiles = [
       ####################################
-      # CR modality examples:
-      ####################################
-      ["CR-MONO1-10-chest.dcm",
-         [ ["Modality", "CR"],
-           #"Transfer Syntax UID" is absent.
-           ["Rows", "440"],
-           ["Columns", "440"],
-           ["Bits Stored", "10"],
-           ["Bits Allocated", "16"],
-           ["High Bit", "9"],
-           ["Pixel Representation", "0"],
-           ["Manufacturer", "FUJI PHOTO FILM CO. LTD."],
-           ["Manufacturer's Model Name", "9000"],
-           ["Pixel Data", "gdcm::NotLoaded. Address:776 Length:387200 x(5e880)"]
-         ] ],
-      ####################################
       # CT modality examples:
       ####################################
-      ["CT-MONO2-16-brain.dcm",
-         [ ["Transfer Syntax UID", "1.2.840.10008.1.2.1"],  # Explicit VR, LE
-           ["Modality", "CT"],
-           ["Rows", "512"],
-           ["Columns", "512"],
-           ["Bits Stored", "16"],
-           ["Bits Allocated", "16"],
-           ["High Bit", "15"],
-           ["Pixel Representation", "1"],
-           ["Manufacturer", "Picker International, Inc."],
-           ["Manufacturer's Model Name", "PQ5000"],
-           ["Pixel Data", "gdcm::NotLoaded. Address:1680 Length:524288 x(80000)"]
-         ] ],
       ["CT-MONO2-16-ort.dcm",
          [ ["Transfer Syntax UID", "1.2.840.10008.1.2"],  # Implicit VR, LE
            ["Modality", "CT"],
index e0dd8a54767a3e15029252b9eec362cfb0515c14..3959a469bd712cfb07f1f7faa73e5f814cd56ec3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/08/01 02:39:09 $
-  Version:   $Revision: 1.62 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.63 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 /**
  * \ingroup gdcmDicomDir
  * \brief   Constructor : creates an empty gdcmDicomDir
- * @param   exception_on_error whether we want to throw an exception or not
  */
-gdcmDicomDir::gdcmDicomDir(bool exception_on_error):                           
-   gdcmDocument( exception_on_error )
+gdcmDicomDir::gdcmDicomDir()
+   :gdcmDocument( )
 { 
    Initialize();
 
@@ -71,11 +70,9 @@ gdcmDicomDir::gdcmDicomDir(bool exception_on_error):
  *                        and wants to explore recursively the directories
  *                      - false if user passed an already built DICOMDIR file
  *                        and wants to use it 
- * @param exception_on_error whether we want to throw an exception or not
  */
-gdcmDicomDir::gdcmDicomDir(std::string const & fileName, bool parseDir,
-                           bool exception_on_error):
-   gdcmDocument( fileName, exception_on_error)
+gdcmDicomDir::gdcmDicomDir(std::string const & fileName, bool parseDir ):
+   gdcmDocument( fileName )
 {
    // que l'on ai passe un root directory ou un DICOMDIR
    // et quelle que soit la valeur de parseDir,
@@ -449,7 +446,7 @@ void gdcmDicomDir::CreateDicomDirChainedList(std::string const & path)
          break;
       }
 
-      header = new gdcmHeader( it->c_str(),false );
+      header = new gdcmHeader( it->c_str() );
       if( !header )
       {
          dbg.Verbose( 1,
index 99d867803d9a46e646606bc032b0a77d315da754..1c1af26a8a40d195b8c6c85160f62fc96fe91184 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2004/07/19 03:34:11 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.26 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -43,10 +43,8 @@ typedef GDCM_EXPORT void(gdcmMethod)(void * = NULL);
 class GDCM_EXPORT gdcmDicomDir: public gdcmDocument
 {
 public:
-   gdcmDicomDir(std::string const & fileName, 
-                bool parseDir = false,
-                bool exception_on_error = false);
-   gdcmDicomDir(bool exception_on_error = false); 
+   gdcmDicomDir( std::string const & fileName, bool parseDir = false );
+   gdcmDicomDir(); 
                    
    ~gdcmDicomDir();
 
index 22b095702fa39597e72f807781f800e2cb6bafd2..10fd52f39b03b6b8e7301947ab205a10aa755220 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/08/02 14:06:57 $
-  Version:   $Revision: 1.64 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.65 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -82,17 +82,15 @@ const unsigned int gdcmDocument::MAX_SIZE_PRINT_ELEMENT_VALUE = 0x7fffffff;
 /**
  * \brief   constructor  
  * @param   inFilename file to be opened for parsing
- * @param   exception_on_error whether we throw an exception or not
  */
-gdcmDocument::gdcmDocument( std::string const & filename, 
-                            bool exception_on_error) 
+gdcmDocument::gdcmDocument( std::string const & filename ) 
               : gdcmElementSet(-1)
 {
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE); 
    Filename = filename;
    Initialise();
 
-   if ( !OpenFile(exception_on_error))
+   if ( !OpenFile()
    {
       return;
    }
@@ -136,7 +134,11 @@ gdcmDocument::gdcmDocument( std::string const & filename,
    CloseFile(); 
   
    // --------------------------------------------------------------
-   // Special Patch to allow gdcm to read ACR-LibIDO formated images
+   // Specific code to allow gdcm to read ACR-LibIDO formated images
+   // Note: ACR-LibIDO is an extension of the ACR standard that was
+   //       used at CREATIS. For the time being (say a couple years)
+   //       we keep this kludge to allow a smooth move to gdcm for
+   //       CREATIS developpers (sorry folks).
    //
    // if recognition code tells us we deal with a LibIDO image
    // we switch lineNumber and columnNumber
@@ -153,23 +155,20 @@ gdcmDocument::gdcmDocument( std::string const & filename,
          SetEntryByNumber(columns, 0x0028, 0x0010);
          SetEntryByNumber(rows   , 0x0028, 0x0011);
    }
-   // ----------------- End of Special Patch ---------------- 
+   // ----------------- End of ACR-LibIDO kludge ------------------ 
 
    PrintLevel = 1;  // 'Medium' print level by default
 }
 
 /**
- * \brief  constructor 
- * @param   exception_on_error
+ * \brief This default constructor doesn't parse the file. You should
+ *        then invoke \ref gdcmDocument::SetFileName and then the parsing.
  */
-gdcmDocument::gdcmDocument(bool exception_on_error
+gdcmDocument::gdcmDocument() 
              :gdcmElementSet(-1)
 {
-   (void)exception_on_error;
-
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
    Initialise();
-
    PrintLevel = 1;  // 'Medium' print level by default
 }
 
@@ -462,58 +461,46 @@ FileType gdcmDocument::GetFileType()
 }
 
 /**
- * \brief   opens the file
- * @param   exception_on_error
- * @return  
+ * \brief  Tries to open the file \ref gdcmDocument::Filename and
+ *         checks the preamble when existing.
+ * @return The FILE pointer on success. 
  */
-FILE *gdcmDocument::OpenFile(bool exception_on_error)
-  throw(gdcmFileError) 
+FILE* gdcmDocument::OpenFile()
 {
-  Fp = fopen(Filename.c_str(),"rb");
+   Fp = fopen(Filename.c_str(),"rb");
 
-  if(!Fp)
-  {
-     if(exception_on_error)
-     {
-        throw gdcmFileError("gdcmDocument::gdcmDocument(const char *, bool)");
-     }
-     else
-     {
-        dbg.Verbose(0, "gdcmDocument::OpenFile cannot open file: ",
-                    Filename.c_str());
-        return NULL;
-     }
-  }
-
-  if ( Fp )
-  {
-     uint16_t zero;
-     fread(&zero,  (size_t)2, (size_t)1, Fp);
-
-    //ACR -- or DICOM with no Preamble --
-    if( zero == 0x0008 || zero == 0x0800 || zero == 0x0002 || zero == 0x0200 )
-    {
-       return Fp;
-    }
-
-    //DICOM
-    fseek(Fp, 126L, SEEK_CUR);
-    char dicm[4];
-    fread(dicm,  (size_t)4, (size_t)1, Fp);
-    if( memcmp(dicm, "DICM", 4) == 0 )
-    {
-       return Fp;
-    }
-
-    fclose(Fp);
-    dbg.Verbose(0, "gdcmDocument::OpenFile not DICOM/ACR", Filename.c_str());
-  }
-  else
-  {
-    dbg.Verbose(0, "gdcmDocument::OpenFile cannot open file", Filename.c_str());
-  }
-
-  return 0;
+   if(!Fp)
+   {
+      dbg.Verbose( 0,
+                   "gdcmDocument::OpenFile cannot open file: ",
+                   Filename.c_str());
+      return 0;
+   }
+   uint16_t zero;
+   fread(&zero,  (size_t)2, (size_t)1, Fp);
+   //ACR -- or DICOM with no Preamble --
+   if( zero == 0x0008 || zero == 0x0800 || zero == 0x0002 || zero == 0x0200 )
+   {
+      return Fp;
+   }
+   //DICOM
+   fseek(Fp, 126L, SEEK_CUR);
+   char dicm[4];
+   fread(dicm,  (size_t)4, (size_t)1, Fp);
+   if( memcmp(dicm, "DICM", 4) == 0 )
+   {
+      return Fp;
+   }
+   fclose(Fp);
+   dbg.Verbose( 0,
+                "gdcmDocument::OpenFile not DICOM/ACR (missing preamble)",
+                Filename.c_str());
+   return 0;
 }
 
 /**
index 0923cfb6a430d281b52b0d35d558cca97f140a40..24e1cd2ef666bd9b124abfaae6d2c6f89066ad06 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2004/08/02 14:06:58 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  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
@@ -131,7 +131,7 @@ public:
 
    FileType GetFileType();
 
-   FILE* OpenFile(bool exception_on_error = false) throw( gdcmFileError );
+   FILE* OpenFile();
    bool CloseFile();
 
    void Write(FILE* fp, FileType type);
@@ -141,12 +141,14 @@ public:
 
    gdcmBinEntry* ReplaceOrCreateByNumber(void *voidArea, int lgth,
                                          uint16_t group, uint16_t elem);
-   bool ReplaceIfExistByNumber (std::string const & value, uint16_t group, uint16_t elem);
+   bool ReplaceIfExistByNumber ( std::string const & value,
+                                 uint16_t group,
+                                 uint16_t elem );
    
    virtual void* LoadEntryVoidArea(uint16_t group, uint16_t elem);
    virtual void* LoadEntryVoidArea(gdcmBinEntry* entry);
       
-   // System access
+   // System access (meaning endian related !?)
    uint16_t SwapShort(uint16_t);   // needed by gdcmFile
    uint32_t SwapLong(uint32_t);    // needed by gdcmFile
    uint16_t UnswapShort(uint16_t); // needed by gdcmFile
@@ -156,9 +158,8 @@ protected:
    // Constructor and destructor are protected to forbid end user 
    // to instanciate from this class gdcmDocument (only gdcmHeader and
    // gdcmDicomDir are meaningfull).
-   gdcmDocument(bool exception_on_error  = false);
-   gdcmDocument(std::string const & filename, 
-                bool  exception_on_error = false);
+   gdcmDocument();
+   gdcmDocument( std::string const & filename );
    virtual ~gdcmDocument();
    
    void Parse7FE0 ();   
index 975b0a4f7ac07d1c1faf0b47bccfc5e9290e2e90..b016e992e73844f3288e61104e8c91904706f456 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/07/31 23:30:04 $
-  Version:   $Revision: 1.119 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.120 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -62,12 +62,10 @@ gdcmFile::gdcmFile(gdcmHeader *header)
  *        one sets an a posteriori shadow dictionary (efficiency can be
  *        seen as a side effect).   
  * @param filename file to be opened for parsing
- * @param   exception_on_error whether we throw an exception or not
  */
-gdcmFile::gdcmFile(std::string const & filename, 
-                   bool exception_on_error )
+gdcmFile::gdcmFile(std::string const & filename )
 {
-   Header = new gdcmHeader( filename, exception_on_error );
+   Header = new gdcmHeader( filename );
    SelfHeader = true;
    PixelRead  = -1; // no ImageData read yet.
 
index b58a6b595beb31ba146a9d09d5e8bb06da4f387f..a229157f442de84769f8eb1387effe7e590aa53a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/07/31 23:30:04 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  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
@@ -31,9 +31,8 @@
 class GDCM_EXPORT gdcmFile
 {
 public:
-   gdcmFile(gdcmHeader *header);
-   gdcmFile(std::string const & filename, 
-            bool exception_on_error = false);
+   gdcmFile( gdcmHeader *header );
+   gdcmFile( std::string const & filename );
  
    virtual ~gdcmFile();
 
index 90299a8a0ab45d4a08a4d685b8f7533b1390f508..383deaa5f36ebfcee1d341a5b09663cb1b94489d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/07/31 23:30:04 $
-  Version:   $Revision: 1.181 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.182 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 /**
  * \brief  Constructor 
  * @param  filename name of the file whose header we want to analyze
- * @param  exception_on_error whether we want to throw an exception or not
  */
-gdcmHeader::gdcmHeader( std::string const & filename, 
-                        bool exception_on_error ):
-            gdcmDocument( filename,
-                          exception_on_error )
+gdcmHeader::gdcmHeader( std::string const & filename ):
+            gdcmDocument( filename )
 {    
    // for some ACR-NEMA images GrPixel, NumPixel is *not* 7fe0,0010
    // We may encounter the 'RETired' (0x0028, 0x0200) tag
@@ -80,10 +77,9 @@ gdcmHeader::gdcmHeader( std::string const & filename,
 
 /**
  * \brief Constructor  
- * @param exception_on_error whether we want to throw an exception or not
  */
-gdcmHeader::gdcmHeader(bool exception_on_error) :
-            gdcmDocument( exception_on_error )
+gdcmHeader::gdcmHeader()
+           :gdcmDocument()
 {
 }
 
index 9110e023bba15dbfbd8e40c790827691022701c1..b521ed312d2e6665c4675ccde06133e05c84fc89 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/07/31 23:30:04 $
-  Version:   $Revision: 1.85 $
+  Date:      $Date: 2004/08/02 16:42:14 $
+  Version:   $Revision: 1.86 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -107,9 +107,8 @@ protected:
    uint16_t GrPixel;
 
 public:
-   gdcmHeader(bool exception_on_error = false);
-   gdcmHeader(std::string const & filename, 
-              bool  exception_on_error = false);
+   gdcmHeader();
+   gdcmHeader( std::string const & filename );
  
    virtual ~gdcmHeader();
 
index 7953ac8e7255315e754e3731c5bee389db2d889d..5a03ade4c6de57e2632361183f1aebe2a53d22ef 100644 (file)
@@ -58,7 +58,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.47 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.48 $");
 vtkStandardNewMacro(vtkGdcmReader);
 
 //-----------------------------------------------------------------------------
@@ -444,7 +444,7 @@ int vtkGdcmReader::CheckFileCoherence()
       fclose(fp);
 
       // Stage 1.2: check for Gdcm parsability
-      gdcmHeader GdcmHeader(FileName->c_str(), false );
+      gdcmHeader GdcmHeader(FileName->c_str() );
       if (!GdcmHeader.IsReadable())
       {
          vtkErrorMacro("Gdcm cannot parse file " << FileName->c_str());
@@ -610,7 +610,7 @@ size_t vtkGdcmReader::LoadImageInMemory(
              unsigned long & UpdateProgressCount)
 {
    vtkDebugMacro("Copying to memory image [" << FileName.c_str() << "]");
-   gdcmFile GdcmFile( FileName.c_str(), false );
+   gdcmFile GdcmFile( FileName.c_str() );
    size_t size;
 
    // If the data structure of vtk for image/volume representation