]> Creatis software - gdcm.git/commitdiff
ENH: const'ify gdcmFile thus remove double signature with const char*
authormalaterre <malaterre>
Mon, 21 Jun 2004 04:52:08 +0000 (04:52 +0000)
committermalaterre <malaterre>
Mon, 21 Jun 2004 04:52:08 +0000 (04:52 +0000)
src/gdcmFile.cxx
src/gdcmFile.h

index d4ff733034f663532d3a920e2ddf9faab854299a..e13944b2a10be1c6cd2d270e3fa7c568ecf75a95 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:47 $
-  Version:   $Revision: 1.103 $
+  Date:      $Date: 2004/06/21 04:52:08 $
+  Version:   $Revision: 1.104 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,7 +70,7 @@ gdcmFile::gdcmFile(gdcmHeader *header) {
  *          with a FALSE value for the 'enable_sequence' param.
  *          ('public elements' may be embedded in 'shadow Sequences')
  */
-gdcmFile::gdcmFile(std::string & filename, 
+gdcmFile::gdcmFile(std::string const & filename, 
                    bool exception_on_error,
                    bool enable_sequences, 
                    bool ignore_shadow) {
@@ -85,44 +85,6 @@ gdcmFile::gdcmFile(std::string & filename,
       SetPixelDataSizeFromHeader();
 }
 
-/**
- * \ingroup   gdcmFile
- * \brief Constructor dedicated to writing a new DICOMV3 part10 compliant
- *        file (see SetFileName, SetDcmTag and Write)
- *        Opens (in read only and when possible) an existing file and checks
- *        for DICOM compliance. Returns NULL on failure.
- * \note  the in-memory representation of all available tags found in
- *        the DICOM header is post-poned to first header information access.
- *        This avoid a double parsing of public part of the header when
- *        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
- * @param   enable_sequences = true to allow the header 
- *          to be parsed *inside* the SeQuences, 
- *          when they have an actual length 
- * \warning enable_sequences *has to be* true for reading PAPYRUS 3.0 files
- * @param   ignore_shadow to allow skipping the shadow elements, 
- *          to save memory space.
- * \warning The TRUE value for this param has to be used 
- *          with a FALSE value for the 'enable_sequence' param.
- *          ('public elements' may be embedded in 'shadow Sequences')
- */
- gdcmFile::gdcmFile(const char *filename, 
-                   bool exception_on_error,
-                   bool enable_sequences, 
-                   bool ignore_shadow) {
-   Header=new gdcmHeader(filename,
-                         exception_on_error,
-                         enable_sequences,
-                         ignore_shadow);
-   SelfHeader=true;
-   PixelRead=-1; // no ImageData read yet.
-
-   if (Header->IsReadable())
-      SetPixelDataSizeFromHeader();
-}
-
 /**
  * \ingroup   gdcmFile
  * \brief canonical destructor
index dd5b4655e87e720530cc6f336f11014260b4cbd4..3538a865a8968d3a9fe261498dd6f6b522e584cf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:47 $
-  Version:   $Revision: 1.30 $
+  Date:      $Date: 2004/06/21 04:52:08 $
+  Version:   $Revision: 1.31 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -32,12 +32,7 @@ class GDCM_EXPORT gdcmFile
 {
 public:
    gdcmFile(gdcmHeader *header);
-   gdcmFile(std::string & filename, 
-              bool  exception_on_error = false, 
-              bool  enable_sequences   = false,
-              bool  skip_shadow        = false);
-   gdcmFile(const char * filename, 
+   gdcmFile(std::string const & filename, 
               bool  exception_on_error = false, 
               bool  enable_sequences   = false,
               bool  skip_shadow        = false);