]> Creatis software - gdcm.git/commitdiff
STYLE: Cleanup outside API, there is still too much offered to user
authormalaterre <malaterre>
Wed, 23 Jun 2004 03:36:24 +0000 (03:36 +0000)
committermalaterre <malaterre>
Wed, 23 Jun 2004 03:36:24 +0000 (03:36 +0000)
src/gdcmDicomDirElement.cxx
src/gdcmFile.cxx
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmHeader.h
src/gdcmRLE.cxx
src/gdcmSeqEntry.cxx
src/gdcmTS.cxx
src/gdcmUtil.cxx
src/gdcmValEntry.h

index edef2e05a1a191c7bd6e6763ff17af258eb6f22b..e7a1fdb14078dbe4a7bb188163191ea5e01c3c5c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:47 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  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
@@ -33,7 +33,7 @@
  * \brief   constructor : populates the chained lists 
  *          from the file 'Dicts/DicomDir.dic'
  */
- gdcmDicomDirElement::gdcmDicomDirElement(void) {
+gdcmDicomDirElement::gdcmDicomDirElement() {
    std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_ELEM);
    std::ifstream from(filename.c_str());
    dbg.Error(!from, "gdcmDicomDirElement::gdcmDicomDirElement: can't open dictionary",filename.c_str());
@@ -79,7 +79,7 @@
  * \ingroup gdcmDicomDirElement
  * \brief   canonical destructor 
  */
- gdcmDicomDirElement::~gdcmDicomDirElement() {
+gdcmDicomDirElement::~gdcmDicomDirElement() {
    DicomDirMetaList.clear();
    DicomDirPatientList.clear();
    DicomDirStudyList.clear();
index 2643cd0c30a49a6b94837f2f0cae219913d7fa0e..97797c862b66fb3d91fba0ed6446ab3b35f8a3f8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 14:14:01 $
-  Version:   $Revision: 1.106 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.107 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -91,7 +91,7 @@ gdcmFile::gdcmFile(std::string const & filename,
  * \note  If the gdcmHeader is created by the gdcmFile, it is destroyed
  *        by the gdcmFile
  */
-gdcmFile::~gdcmFile(void) {
+gdcmFile::~gdcmFile() {
    if(SelfHeader)
       delete Header;
    Header=NULL;
@@ -111,7 +111,7 @@ gdcmFile::~gdcmFile(void) {
  *          (no interest for compressed images).
  * @return length to allocate
  */
-void gdcmFile::SetPixelDataSizeFromHeader(void) {
+void gdcmFile::SetPixelDataSizeFromHeader() {
    // see PS 3.3-2003 : C.7.6.3.2.1  
    // 
    //   MONOCHROME1
@@ -166,8 +166,8 @@ void gdcmFile::SetPixelDataSizeFromHeader(void) {
  *            the pixel data represented in this file.
  * @return    The size of pixel data in bytes.
  */
-size_t gdcmFile::GetImageDataSize(void) {
-   return (lgrTotale);
+size_t gdcmFile::GetImageDataSize() {
+   return lgrTotale;
 }
 
 /**
@@ -179,8 +179,8 @@ size_t gdcmFile::GetImageDataSize(void) {
  * \warning   to be used with GetImagePixelsRaw()
  * @return    The size of pixel data in bytes.
  */
-size_t gdcmFile::GetImageDataSizeRaw(void) {
-   return (lgrTotaleRaw);
+size_t gdcmFile::GetImageDataSizeRaw() {
+   return lgrTotaleRaw;
 }
 
 /**
@@ -193,8 +193,8 @@ size_t gdcmFile::GetImageDataSizeRaw(void) {
  * @return  Pointer to newly allocated pixel data.
  *          NULL if alloc fails 
  */
-void * gdcmFile::GetImageData (void) {
-   PixelData = new char[lgrTotale];
+void * gdcmFile::GetImageData () {
+   PixelData = new unsigned char[lgrTotale];  //consistant with GetImageDataIntoVector
    if (PixelData) {
       GetImageDataIntoVector(PixelData, lgrTotale);
       GetHeader()->SetEntryVoidAreaByNumber(PixelData, 
@@ -203,7 +203,7 @@ void * gdcmFile::GetImageData (void) {
    }      
    PixelRead=0; // no PixelRaw
 
-   return(PixelData);
+   return PixelData;
 }
 
 /**
@@ -290,12 +290,12 @@ size_t gdcmFile::GetImageDataIntoVector (void* destination, size_t MaxSize) {
  * @return  Pointer to newly allocated pixel data.
  * \        NULL if alloc fails 
  */
-void * gdcmFile::GetImageDataRaw (void) {
+void * gdcmFile::GetImageDataRaw () {
    if (Header->HasLUT())
       /// \todo Let gdcmHeadar user a chance to get the right value
                /// Create a member lgrTotaleRaw ???
       lgrTotale /= 3;
-   PixelData = new char[lgrTotale];
+   PixelData = new unsigned char[lgrTotale];
        
    if (PixelData) {
       GetImageDataIntoVectorRaw(PixelData, lgrTotale);
@@ -304,7 +304,8 @@ void * gdcmFile::GetImageDataRaw (void) {
                       GetHeader()->GetNumPixel()); 
    }                           
    PixelRead=1; // PixelRaw
-   return(PixelData);
+
+   return PixelData;
 }
 
 /**
@@ -343,7 +344,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void *destination, size_t MaxSize) {
       return (size_t)0; 
    }
        
-   (void)ReadPixelData(destination);
+   ReadPixelData(destination);
        
        // Number of Bits Allocated for storing a Pixel
    str_nb = Header->GetEntryByNumber(0x0028,0x0100);
@@ -410,8 +411,8 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void *destination, size_t MaxSize) {
             deb ++;
          }
       } else {
-         dbg.Verbose(0, "gdcmFile::GetImageDataIntoVector: wierd image");
-         return (size_t)0; 
+         dbg.Verbose(0, "gdcmFile::GetImageDataIntoVector: weird image");
+         return 0;
       }
    } 
 // DO NOT remove this commented out code .
@@ -567,7 +568,8 @@ bool gdcmFile::SetImageData(void *inData, size_t ExpectedSize) {
    PixelData = inData;
    lgrTotale = ExpectedSize;
    PixelRead = 1;
-   return(true);
+
+   return true;
 }
 
 /**
@@ -580,16 +582,17 @@ bool gdcmFile::SetImageData(void *inData, size_t ExpectedSize) {
  * @return false if write fails        
  */
 
-bool gdcmFile::WriteRawData (std::string fileName) {
+bool gdcmFile::WriteRawData (std::string const & fileName) {
    FILE *fp1;
    fp1 = fopen(fileName.c_str(),"wb");
    if (fp1 == NULL) {
       printf("Fail to open (write) file [%s] \n",fileName.c_str());
-      return (false);
+      return false;
    }   
    fwrite (PixelData,lgrTotale, 1, fp1);
    fclose (fp1);
-   return(true);
+
+   return true;
 }
 
 /**
@@ -602,23 +605,10 @@ bool gdcmFile::WriteRawData (std::string fileName) {
  * @return false if write fails        
  */
 
-bool gdcmFile::WriteDcmImplVR (std::string fileName) {
+bool gdcmFile::WriteDcmImplVR (std::string const & fileName) {
    return WriteBase(fileName, gdcmImplicitVR);
 }
 
-/**
- * \ingroup   gdcmFile
- * \brief Writes on disk A SINGLE Dicom file, 
- *        using the Implicit Value Representation convention
- *        NO test is performed on  processor "Endiannity". * @param fileName name of the file to be created
- *                 (any already existing file is overwritten)
- * @return false if write fails        
- */
-bool gdcmFile::WriteDcmImplVR (const char *fileName) {
-   return WriteDcmImplVR (std::string (fileName));
-}
-       
 /**
  * \ingroup   gdcmFile
 * \brief Writes on disk A SINGLE Dicom file, 
@@ -628,7 +618,7 @@ bool gdcmFile::WriteDcmImplVR (const char *fileName) {
  * @return false if write fails        
  */
 
-bool gdcmFile::WriteDcmExplVR (std::string fileName) {
+bool gdcmFile::WriteDcmExplVR (std::string const & fileName) {
    return WriteBase(fileName, gdcmExplicitVR);
 }
        
@@ -647,7 +637,7 @@ bool gdcmFile::WriteDcmExplVR (std::string fileName) {
  * @return false if write fails                
  */
 
-bool gdcmFile::WriteAcr (std::string fileName) {
+bool gdcmFile::WriteAcr (std::string const & fileName) {
    return WriteBase(fileName, gdcmACR);
 }
 
@@ -662,7 +652,7 @@ bool gdcmFile::WriteAcr (std::string fileName) {
  * @param  type file type (ExplicitVR, ImplicitVR, ...)
  * @return false if write fails                
  */
-bool gdcmFile::WriteBase (std::string fileName, FileType type) {
+bool gdcmFile::WriteBase (std::string const & fileName, FileType type) {
 
    FILE *fp1;
    
@@ -751,7 +741,8 @@ bool gdcmFile::WriteBase (std::string fileName, FileType type) {
    
   // fwrite(PixelData, lgrTotale, 1, fp1);  // should be useless, now
    fclose (fp1);
-   return(true);
+
+   return true;
 }
 
 //-----------------------------------------------------------------------------
@@ -766,12 +757,12 @@ bool gdcmFile::WriteBase (std::string fileName, FileType type) {
  * @param   nb Pixels Bit number 
  */
 void gdcmFile::SwapZone(void *im, int swap, int lgr, int nb) {
-guint32 s32;
-guint16 fort,faible;
-int i;
+  guint32 s32;
+  guint16 fort,faible;
+  int i;
 
-if(nb == 16)  
-   switch(swap) {
+  if(nb == 16)  
+     switch(swap) {
       case 0:
       case 12:
       case 1234:
@@ -792,8 +783,8 @@ if(nb == 16)
          printf("SWAP value (16 bits) not allowed : %d\n", swap);
    } 
  
-if( nb == 32 )
-   switch (swap) {
+  if( nb == 32 )
+     switch (swap) {
       case 0:
       case 1234:
          break;
@@ -830,9 +821,8 @@ if( nb == 32 )
          break; 
                                
       default:
-         printf("SWAP value (32 bits) not allowed : %d\n", swap);
+         std::cout << "SWAP value (32 bits) not allowed : " << swap << std::endl;
    } 
-return;
 }
 
 /**
@@ -876,7 +866,7 @@ bool gdcmFile::ReadPixelData(void *destination) {
       }
 
       Header->CloseFile();
-      return(true);
+      return true;
    }        
 
    // ----------------------  Uncompressed File
index 1b8531d3ea5287d016553398e8daadee9670a147..5d042c8e39299494e338ea9d8c9b173fa1ebfd77 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/23 02:13:14 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  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
@@ -33,14 +33,14 @@ class GDCM_EXPORT gdcmFile
 public:
    gdcmFile(gdcmHeader *header);
    gdcmFile(std::string const & filename, 
-              bool  exception_on_error = false, 
-              bool  enable_sequences   = false,
-              bool  skip_shadow        = false);
+            bool  exception_on_error = false, 
+            bool  enable_sequences   = false,
+            bool  skip_shadow        = false);
  
-   virtual ~gdcmFile(void);
+   virtual ~gdcmFile();
        
  /// \brief returns the gdcmHeader *Header
-   inline gdcmHeader *GetHeader(void) {return(Header);};
+   inline gdcmHeader *GetHeader() { return Header;};
 
    // For promotion (performs a deepcopy of pointed header object)
    // TODO Swig gdcmFile(gdcmHeader* header);
@@ -51,7 +51,7 @@ public:
         // different from the constructor's one (no overwriting allowed).
    // TODO Swig int SetFileName(std::string filename);
 
-   void   SetPixelDataSizeFromHeader(void);
+   void   SetPixelDataSizeFromHeader();
    size_t GetImageDataSize();
    size_t GetImageDataSizeRaw();
 
@@ -77,16 +77,15 @@ public:
    // Write pixels of ONE image on hard drive
    // No test is made on processor "endianity"
    // The user must call his reader correctly
-   bool WriteRawData  (std::string fileName);
-   bool WriteDcmImplVR(std::string fileName);
-   bool WriteDcmImplVR(const char * fileName);
-   bool WriteDcmExplVR(std::string fileName);
-   bool WriteAcr      (std::string fileName);
+   bool WriteRawData  (std::string const & fileName);
+   bool WriteDcmImplVR(std::string const & fileName);
+   bool WriteDcmExplVR(std::string const & fileName);
+   bool WriteAcr      (std::string const & fileName);
 
    // Body in file gdcmParse.cxx
-   bool ParsePixelData(void);
+   bool ParsePixelData();
 
-   inline virtual bool SetEntryByNumber(std::string content,
+   inline virtual bool SetEntryByNumber(std::string const & content,
                                         guint16 group, guint16 element)
       { GetHeader()->SetEntryByNumber(content,group,element); 
         return true;  //default behavior ?
@@ -94,7 +93,7 @@ public:
 
      
 protected:
-   bool WriteBase(std::string FileName, FileType type);
+   bool WriteBase(std::string const & FileName, FileType type);
 
 private:
    void SwapZone(void* im, int swap, int lgr, int nb);
@@ -138,7 +137,7 @@ private:
   ///        ==-1 if ImageData never read                       
    int PixelRead;     
 
-   /// weather already parsed 
+   /// wether already parsed 
    int Parsed;
    
    /// To avoid file overwrite              
index d5afdca66f09f745142cdbd2fc35aa137b82a3ff..aa808aeb26e4d4e9bc5b78a7f3254e83cd23def5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 14:18:49 $
-  Version:   $Revision: 1.167 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.168 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -90,7 +90,7 @@ gdcmHeader::gdcmHeader(bool exception_on_error) :
  * \ingroup gdcmHeader
  * \brief   Canonical destructor.
  */
-gdcmHeader::~gdcmHeader (void) {
+gdcmHeader::~gdcmHeader () {
 }
 
 //-----------------------------------------------------------------------------
@@ -108,7 +108,7 @@ gdcmHeader::~gdcmHeader (void) {
  * @return true when gdcmHeader is the one of a reasonable Dicom/Acr file,
  *         false otherwise. 
  */
-bool gdcmHeader::IsReadable(void) {
+bool gdcmHeader::IsReadable() {
    if(!gdcmDocument::IsReadable()) {
       return false;
    }
@@ -131,7 +131,7 @@ bool gdcmHeader::IsReadable(void) {
  * @return  The encountered size when found, 0 by default.
  *          0 means the file is NOT USABLE. The caller will have to check
  */
-int gdcmHeader::GetXSize(void) {
+int gdcmHeader::GetXSize() {
    std::string StrSize;
    StrSize = GetEntryByNumber(0x0028,0x0011);
    if (StrSize == GDCM_UNFOUND)
@@ -146,7 +146,7 @@ int gdcmHeader::GetXSize(void) {
  * @return  The encountered size when found, 1 by default 
  *          (The ACR-MEMA file contains a Signal, not an Image).
  */
-int gdcmHeader::GetYSize(void) {
+int gdcmHeader::GetYSize() {
    std::string StrSize = GetEntryByNumber(0x0028,0x0010);
    if (StrSize != GDCM_UNFOUND)
       return atoi(StrSize.c_str());
@@ -167,7 +167,7 @@ int gdcmHeader::GetYSize(void) {
  *          being the ACR-NEMA "Planes" tag content.
  * @return  The encountered size when found, 1 by default (single image).
  */
-int gdcmHeader::GetZSize(void) {
+int gdcmHeader::GetZSize() {
    // Both  DicomV3 and ACR/Nema consider the "Number of Frames"
    // as the third dimension.
    std::string StrSize = GetEntryByNumber(0x0028,0x0008);
@@ -532,7 +532,7 @@ int gdcmHeader::GetImageNumber() {
   * \brief gets the info from 0008,0060 : Modality
   * @return Modality Type
   */
-ModalityType gdcmHeader::GetModality(void) {
+ModalityType gdcmHeader::GetModality() {
   // 0008 0060 CS ID Modality
   std::string StrModality = GetEntryByNumber(0x0008,0x0060);
   if (StrModality != GDCM_UNFOUND) {
@@ -609,7 +609,7 @@ int gdcmHeader::GetBitsStored() {
  * @return  The encountered number of Bits Allocated, 0 by default.
  *          0 means the file is NOT USABLE. The caller has to check it !
  */
-int gdcmHeader::GetBitsAllocated(void) {
+int gdcmHeader::GetBitsAllocated() {
    std::string StrSize = GetEntryByNumber(0x0028,0x0100);
    if (StrSize == GDCM_UNFOUND)
       return 0; // It's supposed to be mandatory
@@ -624,7 +624,7 @@ int gdcmHeader::GetBitsAllocated(void) {
  * @return  The encountered number of Samples Per Pixel, 1 by default.
  *          (Gray level Pixels)
  */
-int gdcmHeader::GetSamplesPerPixel(void) {
+int gdcmHeader::GetSamplesPerPixel() {
    std::string StrSize = GetEntryByNumber(0x0028,0x0002);
    if (StrSize == GDCM_UNFOUND)
       return 1; // Well, it's supposed to be mandatory ...
@@ -638,7 +638,7 @@ int gdcmHeader::GetSamplesPerPixel(void) {
  *          (0 : RGB Pixels , 1 : R Plane + G Plane + B Plane)
  * @return  The encountered Planar Configuration, 0 by default.
  */
-int gdcmHeader::GetPlanarConfiguration(void) {
+int gdcmHeader::GetPlanarConfiguration() {
    std::string StrSize = GetEntryByNumber(0x0028,0x0006);
    if (StrSize == GDCM_UNFOUND)
       return 0;
@@ -718,7 +718,7 @@ std::string gdcmHeader::GetPixelType() {
  *          of *image* pixels (not *icone image* pixels, if any !)
  * @return Pixel Offset
  */
-size_t gdcmHeader::GetPixelOffset(void) { 
+size_t gdcmHeader::GetPixelOffset() { 
       
    gdcmDocEntry* PixelElement = GetDocEntryByNumber(GrPixel,NumPixel);
  
@@ -742,7 +742,7 @@ size_t gdcmHeader::GetPixelOffset(void) {
  *          -in case of embeded compressed image-)
  *         0 : NOT USABLE file. The caller has to check.
  */
-size_t gdcmHeader::GetPixelAreaLength(void) { 
+size_t gdcmHeader::GetPixelAreaLength() { 
           
    gdcmDocEntry* PixelElement = GetDocEntryByNumber(GrPixel,NumPixel);
 
@@ -801,7 +801,7 @@ bool gdcmHeader::HasLUT() {
   *          when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
   * @ return bit number of each LUT item 
   */
-int gdcmHeader::GetLUTNbits(void) {
+int gdcmHeader::GetLUTNbits() {
    std::vector<std::string> tokens;
    //int LutLength;
    //int LutDepth;
@@ -836,7 +836,7 @@ int gdcmHeader::GetLUTNbits(void) {
   *   no known Dicom reader deals with them :-(
   * @return a RGBA Lookup Table 
   */ 
-unsigned char * gdcmHeader::GetLUTRGBA(void) {
+unsigned char * gdcmHeader::GetLUTRGBA() {
 // Not so easy : see 
 // http://www.barre.nom.fr/medical/dicom2/limitations.html#Color%20Lookup%20Tables
 
@@ -957,7 +957,7 @@ unsigned char * gdcmHeader::GetLUTRGBA(void) {
  *        else 1.
  * @return The full Transfert Syntax Name (as opposed to Transfert Syntax UID)
  */
-std::string gdcmHeader::GetTransfertSyntaxName(void) { 
+std::string gdcmHeader::GetTransfertSyntaxName() { 
    // use the gdcmTS (TS : Transfert Syntax)
    std::string TransfertSyntax = GetEntryByNumber(0x0002,0x0010);
    if (TransfertSyntax == GDCM_UNFOUND) {
index 19326cc9c8b57bd3deecb717ee52f90c2bd653de..bbb940c0a22aa3db3817e9c460d94c0372ebb479 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/21 08:47:14 $
-  Version:   $Revision: 1.76 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.77 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -107,7 +107,7 @@ protected:
    guint16 GrPixel;
 
 public:
-   explicit gdcmHeader(bool exception_on_error = false);
+   gdcmHeader(bool exception_on_error = false);
    gdcmHeader(std::string const & filename, 
               bool  exception_on_error = false, 
               bool  enable_sequences   = false,
index 52f9a9f23927feb731ed0785304df96e33c32936..72cf33403d244acd98670b8c02ad26fb964c259b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLE.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:48 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  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
@@ -145,7 +145,7 @@ bool gdcmFile::gdcm_read_RLE_file (FILE *fp,void * image_buffer) {
       delete[] newDest;
    }
       
-   return(true);
+   return true;
 }
 
 
index 26989164c6595a5f9551a31652febdbd64c6fe40..94b3f9bcc670fc61e93fc1ab26b1ce6a01f54179 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 14:57:11 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.17 $
                                                                                 
   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 @@ gdcmSQItem *gdcmSeqEntry::GetSQItemByOrdinalNumber(int nb) {
        cc != items.end();
        count ++, ++cc){
       if (count==nb)
-         return (*cc);      
+         return *cc;
    }
    return (*(items.end())); // Euhhhhh ?!? Is this the last one . FIXME
 }
index 4a8fffbdf4b5c8886130d28357b139885d0b33ad..630ed7c6916b3dc0c194754aff58c160309e85d5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 13:47:33 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -86,7 +86,7 @@ int gdcmTS::Count(TSKey key)
 std::string gdcmTS::GetValue(TSKey key) 
 {
    if (ts.count(key) == 0) 
-      return (GDCM_UNFOUND);
+      return GDCM_UNFOUND;
    return ts[key];
 }
 
index cabc9675112250c470f7a2decc523f3c7080b7fc..649f98931c97b482af7a5ffd10ef2ec7d05d2a7a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:48 $
-  Version:   $Revision: 1.44 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.45 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -74,7 +74,7 @@ std::string CreateCleanString(std::string s) {
          if(s[str.size()-1]==0)
             str[str.size()-1]=' ';
 
-   return(str);
+   return str;
 }
 
 /**
@@ -108,7 +108,7 @@ std::string GetPath(std::string &fullName)
       fullName.resize(pos1);
    else
       fullName.resize(pos2);
-   return(fullName);
+   return fullName;
 }
 
 /**
@@ -134,5 +134,5 @@ std::string GetName(std::string &fullName)
   for (int j=deb;j<fin+1;j++)
     lastName=lastName+fullName.c_str()[j];
 
-  return(lastName);
+  return lastName;
 } 
index eeecd5d5f2c1939a03746d09989bf70f72d03d4d..42da400cfed34e15d139da58d614384e0cac355a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 14:37:04 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2004/06/23 03:36:24 $
+  Version:   $Revision: 1.15 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,7 +42,7 @@ public:
    /// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
    /// 'string', if it's stored as an integer in the header of the
    /// current Dicom Document Entry
-   inline std::string  GetValue(void)     { return value; };
+   inline std::string  GetValue()     { return value; };
     
    /// Sets the value (string) of the current Dicom Document Entry
    inline void SetValue(std::string val)  { value = val;  };