]> Creatis software - gdcm.git/commitdiff
Coding Style + Doxygenation
authorjpr <jpr>
Thu, 6 Jan 2005 20:03:26 +0000 (20:03 +0000)
committerjpr <jpr>
Thu, 6 Jan 2005 20:03:26 +0000 (20:03 +0000)
59 files changed:
Testing/TestVR.cxx
src/gdcmBase.cxx
src/gdcmBinEntry.cxx
src/gdcmBinEntry.h
src/gdcmCommon.h
src/gdcmDebug.cxx
src/gdcmDebug.h
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDicomDirElement.cxx
src/gdcmDicomDirElement.h
src/gdcmDicomDirMeta.cxx
src/gdcmDicomDirMeta.h
src/gdcmDicomDirObject.cxx
src/gdcmDicomDirObject.h
src/gdcmDicomDirPatient.cxx
src/gdcmDicomDirPatient.h
src/gdcmDicomDirSerie.cxx
src/gdcmDicomDirSerie.h
src/gdcmDicomDirStudy.cxx
src/gdcmDict.cxx
src/gdcmDict.h
src/gdcmDictEntry.cxx
src/gdcmDictEntry.h
src/gdcmDictSet.cxx
src/gdcmDictSet.h
src/gdcmDirList.cxx
src/gdcmDirList.h
src/gdcmDocEntry.cxx
src/gdcmDocEntry.h
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmElementSet.cxx
src/gdcmElementSet.h
src/gdcmException.cxx
src/gdcmException.h
src/gdcmFile.cxx
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmHeader.h
src/gdcmPixelReadConvert.cxx
src/gdcmPixelReadConvert.h
src/gdcmPixelWriteConvert.cxx
src/gdcmPixelWriteConvert.h
src/gdcmSQItem.cxx
src/gdcmSQItem.h
src/gdcmSeqEntry.cxx
src/gdcmSeqEntry.h
src/gdcmSerieHeader.cxx
src/gdcmSerieHeader.h
src/gdcmTS.cxx
src/gdcmTS.h
src/gdcmUtil.cxx
src/gdcmUtil.h
src/gdcmVR.cxx
src/gdcmVR.h
src/gdcmValEntry.cxx
src/gdcmValEntry.h

index 1087e1bb6815bbffd2ebe43736f781e8c13d99c9..6801c655f3c2c3436660abc2052dc669b134b6e9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:16:15 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  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
@@ -22,6 +22,7 @@ int TestVR(int , char *[])
    gdcm::VR vr;
    // There should be 16 entries
    vr.Print( std::cout );
+
    vr.IsVROfStringRepresentable( "" );
    vr.IsVROfBinaryRepresentable( "" );
    vr.IsVROfSequence( "" );
index dafc627a43726dc4c0c622b6e643754802e41095..4f70298c09fe88d4d81fd14b831182bdfff2b095 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBase.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:08:06 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  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
@@ -45,7 +45,7 @@ Base::~Base()
  * \brief   Print all the object
  * @param   os The output stream to be written to.
  */
-void Base::Print(std::ostream & os)
+void Base::Print(std::ostream &os)
 {
 }
 
index 991d3a0149e05728575e31fdc384f668faf332a0..d382e73ccfe09446eb5685fdcf62fdd3f5259954 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:36 $
-  Version:   $Revision: 1.42 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.43 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,7 +30,7 @@ namespace gdcm
 /**
  * \brief   Constructor from a given BinEntry
  */
-BinEntry::BinEntry(DictEntrye) : ValEntry(e)
+BinEntry::BinEntry(DictEntry *e) : ValEntry(e)
 {
    BinArea = 0;
    SelfArea = true;
@@ -40,7 +40,7 @@ BinEntry::BinEntry(DictEntry* e) : ValEntry(e)
  * \brief   Constructor from a given BinEntry
  * @param   e Pointer to existing Doc entry
  */
-BinEntry::BinEntry(DocEntrye) : ValEntry(e->GetDictEntry())
+BinEntry::BinEntry(DocEntry *e) : ValEntry(e->GetDictEntry())
 {
    UsableLength = e->GetLength();
    ReadLength   = e->GetReadLength();
@@ -105,7 +105,7 @@ void BinEntry::Print(std::ostream &os)
  * @param fp already open file pointer
  * @param filetype type of the file to be written
 */
-void BinEntry::WriteContent(std::ofstreamfp, FileType filetype)
+void BinEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    DocEntry::WriteContent(fp, filetype);
    void* binArea = GetBinArea();
@@ -128,7 +128,7 @@ void BinEntry::WriteContent(std::ofstream* fp, FileType filetype)
 
 
 /// \brief Sets the value (non string) of the current Dicom Header Entry
-void BinEntry::SetBinArea( uint8_tarea, bool self )  
+void BinEntry::SetBinArea( uint8_t *area, bool self )  
 { 
    if (BinArea && SelfArea)
       delete[] BinArea;
index 1142ed57439d8bc6bc239b03de0743327be8002b..c0ff6fdb06be6887f4030b8d037a872e20fa3ec9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 13:39:32 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.29 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -35,25 +35,25 @@ namespace gdcm
 class GDCM_EXPORT BinEntry  : public ValEntry
 {
 public:
-   BinEntry( DictEntrye );
-   BinEntry( DocEntryd ); 
+   BinEntry( DictEntry *e );
+   BinEntry( DocEntry *d ); 
 
    ~BinEntry();
    
    void Print( std::ostream &os = std::cout );
-   void WriteContent( std::ofstream*, FileType );
+   void WriteContent( std::ofstream *fp, FileType ft);
 
    /// \brief Returns the area value of the current Dicom Header Entry
    ///  when it's not string-translatable (e.g : a LUT table)         
-   uint8_tGetBinArea()  { return BinArea; }
-   void  SetBinArea( uint8_tarea, bool self = true );
+   uint8_t *GetBinArea()  { return BinArea; }
+   void  SetBinArea( uint8_t *area, bool self = true );
 
    /// Sets the value (string) of the current Dicom Document Entry
-   virtual void SetValue(std::string const & val) {SetValueOnly(val);};
+   virtual void SetValue(std::string const &val) { SetValueOnly(val); };
 private:
    /// \brief unsecure memory area to hold 'non string' values 
    ///       (ie : Lookup Tables, overlays, icons)   
-   uint8_tBinArea;
+   uint8_t *BinArea;
    bool SelfArea;
 };
 } // end namespace gdcm
index d7e55592415edad06107574c6df48f9a9d4e56a3..2fb153918b4300c1ef995951ee0a0f423caa0cf4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmCommon.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/05 15:38:28 $
-  Version:   $Revision: 1.43 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.44 $
                                                                                 
   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 @@
 #include <stdint.h>   // For uint8_t uint16_t and uint32_t
 #else
 #if defined(_MSC_VER) || defined(__BORLANDC__)
-typedef    signed char   int8_t;
+typedef  signed char    int8_t;
 #endif
 typedef  unsigned char  uint8_t;
 typedef  unsigned short uint16_t;
index 6bff5c2b828c18efcd3f26921f22fa9b9b119367..d301a9bf69297b1e0129ffb682fcdc4e54f7ee2f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/09 22:30:43 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  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
@@ -47,7 +47,7 @@ void Debug::SetDebug(int level)
  * @param msg1 first message part
  * @param msg2 second message part 
  */
-void Debug::Verbose(int level, const char * msg1, const char * msg2) 
+void Debug::Verbose(int level, const char *msg1, const char *msg2) 
 {
    if (level > DebugLevel)
    {
@@ -62,7 +62,7 @@ void Debug::Verbose(int level, const char * msg1, const char * msg2)
  * @param msg1 first message part
  * @param msg2 second message part 
  */
-void Debug::Error(bool test, const char * msg1, const char * msg2) 
+void Debug::Error(bool test, const char *msg1, const char *msg2) 
 {
    if (!test)
    {
@@ -78,8 +78,8 @@ void Debug::Error(bool test, const char * msg1, const char * msg2)
  * @param msg2 second message part
  * @param msg3 Third message part  
  */
-void Debug::Error(const char* msg1, const char* msg2,
-                      const char* msg3) 
+void Debug::Error(const char *msg1, const char *msg2,
+                  const char *msg3) 
 {
    std::cerr << "gdcm::" << msg1 << ' ' << msg2 << ' ' << msg3
              << std::endl << std::flush;
@@ -93,8 +93,8 @@ void Debug::Error(const char* msg1, const char* msg2,
  * @param msg1 first message part
  * @param msg2 second message part
  */
-void Debug::Assert(int level, bool test, const char * msg1, 
-                       const char * msg2) 
+void Debug::Assert(int level, bool test, const char *msg1, 
+                   const char *msg2) 
 {
    if (level > DebugLevel)
    {
index 6e719784368cea44e50db361ead48d3e582aef66..4b6d6824dd84c0f45a921d05bcd71dc19c0def37 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,11 +42,11 @@ public:
    Debug(int level = -1);
 
    void SetDebug (int level);
-   void Verbose(int level, const char* msg1, const char* msg2 = "") ;
-   void Error  (bool test, const char* msg1, const char* msg2 = "");
-   void Error  (const char* msg1, const char* msg2 = "", const char* msg3 = "");
+   void Verbose(int level, const char *msg1, const char *msg2 = "") ;
+   void Error  (bool test, const char *msg1, const char *msg2 = "");
+   void Error  (const char *msg1, const char *msg2 = "", const char *msg3 = "");
 
-   void Assert(int level, bool test, const char * msg1, const char * msg2);
+   void Assert(int level, bool test, const char *msg1, const char *msg2);
    void Exit(int a);
 
    static Debug &GetReference();
index 57401965e5d54f2820062f0b95c6556e3464b35f..d8ca6287cfe254411d8b1f3294a3e0fd65a3410b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 15:41:28 $
-  Version:   $Revision: 1.91 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.92 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -79,7 +79,7 @@ DicomDir::DicomDir()
  *                      - false if user passed an already built DICOMDIR file
  *                        and wants to use it 
  */
-DicomDir::DicomDir(std::string const & fileName, bool parseDir ):
+DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    Document( fileName )
 {
    // Whatever user passed (a root directory or a DICOMDIR)
@@ -244,8 +244,8 @@ void DicomDir::ParseDirectory()
  * @param   argDelete    Argument 
  * \warning In python : the arg parameter isn't considered
  */
-void DicomDir::SetStartMethod( DicomDir::Method* method, void* arg, 
-                               DicomDir::MethodargDelete )
+void DicomDir::SetStartMethod( DicomDir::Method *method, void *arg, 
+                               DicomDir::Method *argDelete )
 {
    if( StartArg && StartMethodArgDelete )
    {
@@ -264,7 +264,7 @@ void DicomDir::SetStartMethod( DicomDir::Method* method, void* arg,
  *          class is destroyed
  * @param   method Method to call to delete the argument
  */
-void DicomDir::SetStartMethodArgDelete( DicomDir::Methodmethod ) 
+void DicomDir::SetStartMethodArgDelete( DicomDir::Method *method ) 
 {
    StartMethodArgDelete = method;
 }
@@ -278,8 +278,8 @@ void DicomDir::SetStartMethodArgDelete( DicomDir::Method* method )
  * @param   argDelete    Argument  
  * \warning In python : the arg parameter isn't considered
  */
-void DicomDir::SetProgressMethod( DicomDir::Method* method, void* arg, 
-                                  DicomDir::MethodargDelete )
+void DicomDir::SetProgressMethod( DicomDir::Method *method, void *arg, 
+                                  DicomDir::Method *argDelete )
 {
    if( ProgressArg && ProgressMethodArgDelete )
    {
@@ -298,7 +298,7 @@ void DicomDir::SetProgressMethod( DicomDir::Method* method, void* arg,
  *          class is destroyed          
  * @param   method Method to call to delete the argument
  */
-void DicomDir::SetProgressMethodArgDelete( DicomDir::Methodmethod )
+void DicomDir::SetProgressMethodArgDelete( DicomDir::Method *method )
 {
    ProgressMethodArgDelete = method;
 }
@@ -311,8 +311,8 @@ void DicomDir::SetProgressMethodArgDelete( DicomDir::Method* method )
  * @param   argDelete    Argument 
  * \warning In python : the arg parameter isn't considered
  */
-void DicomDir::SetEndMethod( DicomDir::Method* method, void* arg, 
-                             DicomDir::MethodargDelete )
+void DicomDir::SetEndMethod( DicomDir::Method *method, void *arg, 
+                             DicomDir::Method *argDelete )
 {
    if( EndArg && EndMethodArgDelete )
    {
@@ -331,7 +331,7 @@ void DicomDir::SetEndMethod( DicomDir::Method* method, void* arg,
  *          the class is destroyed
  * @param   method Method to call to delete the argument
  */
-void DicomDir::SetEndMethodArgDelete( DicomDir::Methodmethod )
+void DicomDir::SetEndMethodArgDelete( DicomDir::Method *method )
 {
    EndMethodArgDelete = method;
 }
@@ -348,13 +348,13 @@ void DicomDir::SetEndMethodArgDelete( DicomDir::Method* method )
  * @return false only when fail to open
  */
  
-bool DicomDir::WriteDicomDir(std::string constfileName) 
+bool DicomDir::WriteDicomDir(std::string const &fileName) 
 {  
    int i;
    uint16_t sq[4] = { 0x0004, 0x1220, 0xffff, 0xffff };
    uint16_t sqt[4]= { 0xfffe, 0xe0dd, 0xffff, 0xffff };
 
-   std::ofstreamfp = new std::ofstream(fileName.c_str(),  
+   std::ofstream *fp = new std::ofstream(fileName.c_str(),  
                                          std::ios::out | std::ios::binary);
    if( !fp ) 
    {
@@ -486,7 +486,7 @@ DicomDirMeta * DicomDir::NewMeta()
    }
    else  // after root directory parsing
    {
-      ListDicomDirMetaElem const & elemList = 
+      ListDicomDirMetaElem const &elemList = 
          Global::GetDicomDirElements()->GetDicomDirMetaElements();
       m->FillObject(elemList);
    }
@@ -497,7 +497,7 @@ DicomDirMeta * DicomDir::NewMeta()
 /**
  * \brief   adds a new Patient (with the basic elements) to a partially created DICOMDIR
  */
-DicomDirPatient * DicomDir::NewPatient()
+DicomDirPatient *DicomDir::NewPatient()
 {
    ListDicomDirPatientElem::const_iterator it;
    uint16_t tmpGr,tmpEl;
@@ -534,7 +534,7 @@ DicomDirPatient * DicomDir::NewPatient()
  *          GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE ...)
  * @param   header Header of the current file
  */
-void DicomDir::SetElement(std::string const & path, DicomDirType type,
+void DicomDir::SetElement(std::string const &path, DicomDirType type,
                           Document *header)
 {
    ListDicomDirElem elemList; //FIXME this is going to be a by copy operation
@@ -737,7 +737,7 @@ void DicomDir::CreateDicomDir()
       return;         
    }
    
-   SeqEntry* s = dynamic_cast<SeqEntry*>(e);
+   SeqEntry *s = dynamic_cast<SeqEntry *>(e);
    if ( !s )
    {
       dbg.Verbose(0, "DicomDir::CreateDicomDir: no SeqEntry present");
@@ -750,14 +750,14 @@ void DicomDir::CreateDicomDir()
 
    ListSQItem listItems = s->GetSQItems();
    
-   DocEntry * d;
+   DocEntry *d;
    std::string v;
-   SQItem * si;
+   SQItem *si;
    for( ListSQItem::iterator i = listItems.begin(); 
                              i !=listItems.end(); ++i ) 
    {
       d = (*i)->GetDocEntryByNumber(0x0004, 0x1430); // Directory Record Type
-      if ( ValEntry* valEntry = dynamic_cast< ValEntry* >(d) )
+      if ( ValEntry* valEntry = dynamic_cast<ValEntry *>(d) )
       {
          v = valEntry->GetValue();
       }
@@ -970,7 +970,7 @@ void DicomDir::SetElements(std::string const & path, VectDocument const &list)
  *          Only DocEntry's are moved
  * 
  */
-void DicomDir::MoveSQItem(SQItemdst,SQItem *src)
+void DicomDir::MoveSQItem(SQItem *dst,SQItem *src)
 {
    DocEntry *entry;
 
index 4594450a8a5f116cab55b9363d47861b171d7b5f..66bfe02f0c656e22537f3e9c3c2cd631fe111318 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:36 $
-  Version:   $Revision: 1.42 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.43 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -35,8 +35,8 @@ class DicomDirSerie;
 class DicomDirImage;
 class SQItem;
 
-typedef std::list<DicomDirPatient*>   ListDicomDirPatient;
-typedef std::vector<Document*>  VectDocument;
+typedef std::list<DicomDirPatient *>   ListDicomDirPatient;
+typedef std::vector<Document *>  VectDocument;
 
 //-----------------------------------------------------------------------------
 
@@ -50,7 +50,7 @@ class GDCM_EXPORT DicomDir: public Document
 public:
    typedef void(Method)(void*);
 
-   DicomDir( std::string const & filename, bool parseDir = false );
+   DicomDir( std::string const &filename, bool parseDir = false );
    DicomDir(); 
                    
    ~DicomDir();
@@ -73,18 +73,18 @@ public:
    // Note: the DicomDir:: namespace prefix is needed by Swig in the 
    //       following method declarations. Refer to gdcmPython/gdcm.i
    //       for the reasons of this unecessary notation at C++ level.
-   void SetStartMethod(    DicomDir::Method*,
+   void SetStartMethod(    DicomDir::Method *m,
                            void* = NULL,
-                           DicomDir::Method* = NULL );
-   void SetProgressMethod( DicomDir::Method*
+                           DicomDir::Method *m = NULL );
+   void SetProgressMethod( DicomDir::Method *m
                            void* = NULL,
-                           DicomDir::Method* = NULL );
-   void SetEndMethod(      DicomDir::Method*,
+                           DicomDir::Method *m = NULL );
+   void SetEndMethod(      DicomDir::Method *m,
                            void* = NULL, 
-                           DicomDir::Method* = NULL );
-   void SetStartMethodArgDelete( DicomDir::Method* );
-   void SetProgressMethodArgDelete( DicomDir::Method* );
-   void SetEndMethodArgDelete( DicomDir::Method* );
+                           DicomDir::Method *m = NULL );
+   void SetStartMethodArgDelete( DicomDir::Method *m );
+   void SetProgressMethodArgDelete( DicomDir::Method *m );
+   void SetEndMethodArgDelete( DicomDir::Method *m );
 
    /// GetProgress GetProgress
    float GetProgress()  { return Progress; };
@@ -96,11 +96,11 @@ public:
    bool  IsAborted() { return Abort; };
    
    /// Adding
-   DicomDirMeta*    NewMeta();
-   DicomDirPatientNewPatient();
+   DicomDirMeta    *NewMeta();
+   DicomDirPatient *NewPatient();
 
    /// Write  
-   bool WriteDicomDir(std::string const & fileName);
+   bool WriteDicomDir(std::string const &fileName);
 
    /// Types of the DicomDirObject within the DicomDir
    typedef enum
@@ -114,7 +114,7 @@ public:
    } DicomDirType;
    
 protected:
-   void CreateDicomDirChainedList(std::string const & path);
+   void CreateDicomDirChainedList(std::string const &path);
    void CallStartMethod();
    void CallProgressMethod();
    void CallEndMethod();
@@ -124,17 +124,17 @@ private:
    void CreateDicomDir();
 
    bool AddDicomDirMeta();
-   bool AddDicomDirPatientToEnd(DicomDirPatientdd);
-   bool AddDicomDirStudyToEnd  (DicomDirStudydd);
-   bool AddDicomDirSerieToEnd  (DicomDirSeriedd);
-   bool AddDicomDirImageToEnd  (DicomDirImagedd);
+   bool AddDicomDirPatientToEnd(DicomDirPatient *dd);
+   bool AddDicomDirStudyToEnd  (DicomDirStudy *dd);
+   bool AddDicomDirSerieToEnd  (DicomDirSerie *dd);
+   bool AddDicomDirImageToEnd  (DicomDirImage *dd);
 
-   void SetElements(std::string const & path, VectDocument const &list);
-   void SetElement (std::string const & path, DicomDirType type,
-                    Documentheader);
-   void MoveSQItem(SQItemdst,SQItem *src);
+   void SetElements(std::string const &path, VectDocument const &list);
+   void SetElement (std::string const &path, DicomDirType type,
+                    Document *header);
+   void MoveSQItem(SQItem *dst,SQItem *src);
 
-   static bool HeaderLessThan(Document* header1, Document* header2);
+   static bool HeaderLessThan(Document *header1, Document *header2);
    
 // Variables
 
index 2769450b6aeb523fdf803068f5302cd069f91365..f719d3c89af6e928a3e8a2a07b8762d347ba1934 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/04 15:59:37 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/06 20:03:26 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -146,8 +146,8 @@ void DicomDirElement::Print(std::ostream &os)
 //-----------------------------------------------------------------------------
 // Public
 
-bool DicomDirElement::AddNewEntry(std::string const & type, 
-                                  Element const & elem)
+bool DicomDirElement::AddNewEntry(std::string const &type, 
+                                  Element const &elem)
 {
    if( type == "metaElem" )
    {
index 8a17cbedcf749dd037583bef53536e462be293ca..9a879015b5c769bad19b903fe6c89bd01dcc65ba 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/05 15:38:28 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.18 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -66,7 +66,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the META Elements of a DICOMDIR.
     */
-   ListDicomDirMetaElem const & GetDicomDirMetaElements() const
+   ListDicomDirMetaElem const &GetDicomDirMetaElements() const
       { return DicomDirMetaList; };
 
    /**
@@ -74,7 +74,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the PATIENT Elements of a DICOMDIR.
     */      
-   ListDicomDirPatientElem const & GetDicomDirPatientElements() const
+   ListDicomDirPatientElem const &GetDicomDirPatientElements() const
       { return DicomDirPatientList; };
 
    /**
@@ -82,7 +82,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the STUDY Elements of a DICOMDIR.
     */      
-   ListDicomDirStudyElem const & GetDicomDirStudyElements() const
+   ListDicomDirStudyElem const &GetDicomDirStudyElements() const
       { return DicomDirStudyList; };
 
    /**
@@ -90,7 +90,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the SERIE Elements of a DICOMDIR.
     */
-   ListDicomDirSerieElem const & GetDicomDirSerieElements() const
+   ListDicomDirSerieElem const &GetDicomDirSerieElements() const
       { return DicomDirSerieList; };
 
    /**
@@ -98,13 +98,13 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the IMAGE Elements of a DICOMDIR.
     */
-   ListDicomDirImageElem const & GetDicomDirImageElements() const
+   ListDicomDirImageElem const &GetDicomDirImageElements() const
       { return DicomDirImageList; };
 
    /**
     * Public method to add an element
     */
-   bool AddNewEntry(std::string const & type, Element const & elem);
+   bool AddNewEntry(std::string const &type, Element const &elem);
 
 private:
    /// Elements chained list, related to the MetaElements of DICOMDIR
index 9c4a3cc882b68f8d1e40537ac4e135f4a851f57d..05ef4358200a760dea52a7614129167390432077 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,7 +48,7 @@ DicomDirMeta::~DicomDirMeta()
 /**
  * \brief   Prints the Meta Elements
  */ 
-void DicomDirMeta::Print(std::ostreamos)
+void DicomDirMeta::Print(std::ostream &os)
 {
    os << "META" << std::endl;
    // warning : META doesn't behave exactly like a Objet 
@@ -71,7 +71,7 @@ void DicomDirMeta::Print(std::ostream& os)
  * \brief   Writes the Meta Elements
  * @return
  */ 
-void DicomDirMeta::WriteContent(std::ofstreamfp, FileType t)
+void DicomDirMeta::WriteContent(std::ofstream *fp, FileType t)
 {   
    for (ListDocEntry::iterator i = DocEntries.begin();  
                               i != DocEntries.end();
index 5dd4ee826f95c9563cdf0b89bb8a9a97f2d242b2..8162055a51f30573d7464a27187bdcbfb55eb352 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -32,7 +32,7 @@ public:
    ~DicomDirMeta();
 
    virtual void Print(std::ostream &os = std::cout);
-   virtual void WriteContent(std::ofstream * fp, FileType t);
+   virtual void WriteContent(std::ofstream *fp, FileType t);
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
index d4d6216030e6bee242f556c95fe2ba20bdf450c3..ce17714bcdec2adb015ec3b8e2e1d5e83a1c1f41 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -75,7 +75,7 @@ TagDocEntryHT DicomDirObject::GetEntry()
  *          of a partially created DICOMDIR
  * @param elemList Element List to add at the right place
  */
-void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList)
+void DicomDirObject::FillObject(ListDicomDirMetaElem const &elemList)
 {
   // FillObject rempli le SQItem qui sera accroche au bon endroit
 
index 52633eb5cd61af5b9debd8f0186753ee36998f78..92a2d7a1576d90a6793cb419897301e46772350e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.10 $
                                                                                 
   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 @@ class GDCM_EXPORT DicomDirObject : public SQItem
 typedef std::list<DicomDirObject *> ListContent;
 public:
    TagDocEntryHT GetEntry();
-   void FillObject(ListDicomDirMetaElem const & elemList);
+   void FillObject(ListDicomDirMetaElem const &elemList);
 
 protected:
    // Constructor and destructor are protected to avoid end user to
index f01d3984d43f3f9dd5b97bcdba0d3251cfee30b1..815cdc1a901c249aa9d0e5482e3e233edc14588c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,7 +53,7 @@ DicomDirPatient::~DicomDirPatient()
  * \brief   Prints the Object
  * @param os ostream to write to 
  */ 
-void DicomDirPatient::Print(std::ostreamos)
+void DicomDirPatient::Print(std::ostream &os)
 {
    os << "PATIENT" << std::endl;
    DicomDirObject::Print(os);
@@ -72,7 +72,7 @@ void DicomDirPatient::Print(std::ostream& os)
  * @param fp ofstream to write to
  * @param t Type of the File (explicit VR, implicitVR, ...) 
  */ 
-void DicomDirPatient::WriteContent(std::ofstreamfp, FileType t)
+void DicomDirPatient::WriteContent(std::ofstream *fp, FileType t)
 {
    DicomDirObject::WriteContent(fp, t);
 
@@ -92,10 +92,10 @@ void DicomDirPatient::WriteContent(std::ofstream* fp, FileType t)
  */
 DicomDirStudy* DicomDirPatient::NewStudy()
 {
-   ListDicomDirStudyElem const & elemList = 
+   ListDicomDirStudyElem const &elemList = 
       Global::GetDicomDirElements()->GetDicomDirStudyElements();
       
-   DicomDirStudyst = new DicomDirStudy();
+   DicomDirStudy *st = new DicomDirStudy();
    st->FillObject(elemList);
 
    Studies.push_front(st);
index 5c4505fdb65609aa491c7aab9cba822502136715..08d435cc90df1c1d4c06562e85d2e5fcc259eba5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.16 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,13 +38,13 @@ public:
    void WriteContent(std::ofstream *fp, FileType t);
 
    /// Returns the STUDY chained List for this PATIENT.
-   ListDicomDirStudy const & GetDicomDirStudies() const { return Studies; };
+   ListDicomDirStudy const &GetDicomDirStudies() const { return Studies; };
 
    /// adds the passed STUDY to the STUDY chained List for this PATIENT.
    void AddDicomDirStudy (DicomDirStudy *obj) { Studies.push_back(obj); };
 
    ///  TODO
-   DicomDirStudyNewStudy(); 
+   DicomDirStudy *NewStudy(); 
          
 private:
 
index 5055d4b6854b91637ec1c297f1f5dec81f1e178e..2edbf5ea285b4d57c8636a6d6252de9f3dbb21b1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.25 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -52,7 +52,7 @@ DicomDirSerie::~DicomDirSerie()
  * \brief   Prints the Object
  * @param os ostream to write to
  */ 
-void DicomDirSerie::Print(std::ostreamos)
+void DicomDirSerie::Print(std::ostream &os)
 {
    os << "SERIE" << std::endl;
    DicomDirObject::Print(os);
@@ -74,7 +74,7 @@ void DicomDirSerie::Print(std::ostream& os)
  * @param fp ofstream to write to
  * @param t Type of the File (explicit VR, implicitVR, ...)
  */ 
-void DicomDirSerie::WriteContent(std::ofstreamfp, FileType t)
+void DicomDirSerie::WriteContent(std::ofstream *fp, FileType t)
 {
    DicomDirObject::WriteContent(fp, t);
 
@@ -89,12 +89,12 @@ void DicomDirSerie::WriteContent(std::ofstream* fp, FileType t)
 /**
  * \brief   adds a new Image (with the basic elements) to a partially created DICOMDIR
  */
-DicomDirImageDicomDirSerie::NewImage()
+DicomDirImage *DicomDirSerie::NewImage()
 {
-   ListDicomDirImageElem const & elemList = 
+   ListDicomDirImageElem const &elemList = 
       Global::GetDicomDirElements()->GetDicomDirImageElements();
 
-   DicomDirImagest = new DicomDirImage();
+   DicomDirImage *st = new DicomDirImage();
    FillObject(elemList);
    Images.push_front(st);
 
index c9d14d6ab0a2a6539f05793fcb3d61ad8ed89077..5dbf4005ecb0ca7af06dc961948aa612a8e1d2d8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -34,14 +34,14 @@ public:
    DicomDirSerie(); 
    ~DicomDirSerie();
 
-   void Print( std::ostreamos = std::cout );
-   void WriteContent( std::ofstreamfp, FileType t );
+   void Print( std::ostream &os = std::cout );
+   void WriteContent( std::ofstream *fp, FileType t );
 
    /**
     * \ingroup DicomDirSerie
     * \brief   returns the IMAGE chained List for this SERIE.
     */
-   ListDicomDirImage const & GetDicomDirImages() const { return Images; };
+   ListDicomDirImage const &GetDicomDirImages() const { return Images; };
 
    /**
     * \ingroup DicomDirSerie
@@ -53,7 +53,7 @@ public:
  * \ingroup DicomDirSerie
  * \brief   TODO
  */ 
-   DicomDirImageNewImage();
+   DicomDirImage *NewImage();
     
 private:
 /**
index 1c940c7e4e6f26c870f9898c2609716aadcbe164..e817e7340c52133fbc21ea62658018bf9edbb626 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.22 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,7 +53,7 @@ DicomDirStudy::~DicomDirStudy()
  * @param os ostream to write to 
  * @return
  */ 
-void DicomDirStudy::Print(std::ostreamos)
+void DicomDirStudy::Print(std::ostream &os)
 {
    os << "STUDY" << std::endl;
    DicomDirObject::Print(os);
@@ -76,7 +76,7 @@ void DicomDirStudy::Print(std::ostream& os)
  * @param t Type of the File (explicit VR, implicitVR, ...) 
  * @return
  */ 
-void DicomDirStudy::WriteContent(std::ofstreamfp, FileType t)
+void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t)
 {
    DicomDirObject::WriteContent(fp, t);
 
@@ -92,9 +92,9 @@ void DicomDirStudy::WriteContent(std::ofstream* fp, FileType t)
  * \brief   adds a new Serie at the begining of the SerieList
  *          of a partially created DICOMDIR
  */
-DicomDirSerieDicomDirStudy::NewSerie()
+DicomDirSerie *DicomDirStudy::NewSerie()
 {
-   ListDicomDirSerieElem const & elemList = 
+   ListDicomDirSerieElem const &elemList = 
       Global::GetDicomDirElements()->GetDicomDirSerieElements();   
 
    DicomDirSerie* st = new DicomDirSerie();
index 78c3f3f3c1a04f89c7b408c39c635f83ae1bd885..8887d8b21d6d9ce79deb9cf5e84f395d1506938d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:08:06 $
-  Version:   $Revision: 1.53 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -211,12 +211,12 @@ bool Dict::RemoveEntry (TagKey const &key)
  * \brief  removes an already existing Dicom Dictionary Entry, 
  *          identified by its group,element number
  * @param   group   Dicom group number of the Dicom Element
- * @param   element Dicom element number of the Dicom Element
+ * @param   elem Dicom element number of the Dicom Element
  * @return  false if Dicom Dictionary Entry doesn't exist
  */
-bool Dict::RemoveEntry (uint16_t group, uint16_t element)
+bool Dict::RemoveEntry (uint16_t group, uint16_t elem)
 {
-   return RemoveEntry(DictEntry::TranslateToKey(group, element));
+   return RemoveEntry(DictEntry::TranslateToKey(group, elem));
 }
 
 /**
index b7c3c5bc0da29b9d4bfc4168d6b6d545537f8682..cfbdb9e9da071683f4a9d1ee77409b6850167f45 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -59,13 +59,13 @@ public:
    void PrintByName(std::ostream &os = std::cout);
 
 // Entries
-   bool AddNewEntry (DictEntry const & newEntry);
-   bool ReplaceEntry(DictEntry const & newEntry);
-   bool RemoveEntry (TagKey const & key);
+   bool AddNewEntry (DictEntry const &newEntry);
+   bool ReplaceEntry(DictEntry const &newEntry);
+   bool RemoveEntry (TagKey const &key);
    bool RemoveEntry (uint16_t group, uint16_t element);
    
 // Tag
-   DictEntry *GetDictEntryByName(TagName const & name);
+   DictEntry *GetDictEntryByName(TagName const &name);
    DictEntry *GetDictEntryByNumber(uint16_t group, uint16_t element);
 
    EntryNamesList *GetDictEntryNames();
index bc0dddfd3dd246086632876d7c3db935d81b5aea..f56e73ac86e10df893bce62a92bfe4cf9b164c4d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/16 02:54:35 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -36,8 +36,8 @@ namespace gdcm
 */
 
 DictEntry::DictEntry(uint16_t group, uint16_t element,
-                     TagName const & vr, TagName const & fourth,
-                     TagName const & name)
+                     TagName const &vr, TagName const &fourth,
+                     TagName const &name)
 {
    Group   = group;
    Element = element;
@@ -70,7 +70,7 @@ TagKey DictEntry::TranslateToKey(uint16_t group, uint16_t element)
  * \            is unset then overwrite it.
  * @param vr    New V(alue) R(epresentation) to be set.
  */
-void DictEntry::SetVR(TagName const & vr) 
+void DictEntry::SetVR(TagName const &vr) 
 {
    if ( IsVRUnknown() )
    {
index b8dffd1d74b77142afe3b491f8bfc30c2c617753..ab4b95f4827b8d96ea011eedc97e245e3e3d84e0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 13:35:38 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.24 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,13 +40,13 @@ class GDCM_EXPORT DictEntry : public Base
 public:
    DictEntry(uint16_t group, 
              uint16_t element,
-             TagName const & vr     = GDCM_UNKNOWN,
-             TagName const & fourth = GDCM_UNKNOWN,
-             TagName const & name   = GDCM_UNKNOWN);
+             TagName const &vr     = GDCM_UNKNOWN,
+             TagName const &fourth = GDCM_UNKNOWN,
+             TagName const &name   = GDCM_UNKNOWN);
 
    static TagKey TranslateToKey(uint16_t group, uint16_t element);
 
-   void SetVR(TagName const & vr);
+   void SetVR(TagName const &vr);
 
    /// \brief tells if the V(alue) R(epresentation) is known (?!)
    /// @return 
@@ -63,26 +63,26 @@ public:
    /// \brief  Returns the Dicom Value Representation of the current
    ///         DictEntry
    /// @return the Dicom Value Representation
-   const TagName & GetVR() const { return VR; }
+   const TagName &GetVR() const { return VR; }
  
    /// \brief   sets the key of the current DictEntry
    /// @param k New key to be set.
-   void SetKey(TagName const & k)  { Key = k; }
+   void SetKey(TagName const &k)  { Key = k; }
  
    /// \brief   returns the Fourth field of the current DictEntry
    /// \warning NOT part of the Dicom Standard.
    ///          May be REMOVED an any time. NEVER use it.
    /// @return  The Fourth field
-   const TagName & GetFourth() const { return Fourth; } 
+   const TagName &GetFourth() const { return Fourth; } 
 
    /// \brief  Returns the Dicom Name of the current DictEntry
    ///         e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010) 
    /// @return the Dicom Name
-   const TagName & GetName() const { return Name; } 
+   const TagName &GetName() const { return Name; } 
  
    /// \brief  Gets the key of the current DictEntry
    /// @return the key.
-   const TagName & GetKey() const { return Key; }
+   const TagName &GetKey() const { return Key; }
 
 private:
    /// \todo FIXME 
index 3b3c53c6ee9eff6b7fa79e9653f2e32d9d770f82..25a848e98e14e396bd57b1fd512f83f98971091d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/28 19:53:29 $
-  Version:   $Revision: 1.44 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -69,7 +69,7 @@ DictSet::~DictSet()
  *          contained is this DictSet, along with their respective content.
  * @param   os Output stream used for printing.
  */
-void DictSet::Print(std::ostreamos) 
+void DictSet::Print(std::ostream &os) 
 {
    for (DictSetHT::iterator dict = Dicts.begin(); dict != Dicts.end(); ++dict)
    {
@@ -87,7 +87,7 @@ void DictSet::Print(std::ostream& os)
  * \sa DictSet::GetPubDictTagNamesByCategory
  * @return  A list of all entries of the public dicom dictionnary.
  */
-EntryNamesList * DictSet::GetPubDictEntryNames() 
+EntryNamesList *DictSet::GetPubDictEntryNames() 
 {
    return GetDefaultPubDict()->GetDictEntryNames();
 }
@@ -118,7 +118,7 @@ EntryNamesList * DictSet::GetPubDictEntryNames()
  *          corresponding values are lists of all the dictionnary entries
  *          among that group.
  */
-EntryNamesByCatMap * DictSet::GetPubDictEntryNamesByCategory() 
+EntryNamesByCatMap *DictSet::GetPubDictEntryNamesByCategory() 
 {
    return GetDefaultPubDict()->GetDictEntryNamesByCategory();
 }
@@ -148,7 +148,7 @@ Dict *DictSet::LoadDictFromFile(std::string const & filename,
  * @param   dictName The symbolic name of the searched dictionary.
  * \result  The retrieved dictionary.
  */
-Dict *DictSet::GetDict(DictKey const & dictName) 
+Dict *DictSet::GetDict(DictKey const &dictName) 
 {
    DictSetHT::iterator dict = Dicts.find(dictName);
    if(dict != Dicts.end())
@@ -224,7 +224,7 @@ std::string DictSet::BuildDictPath()
 
 //-----------------------------------------------------------------------------
 // Protected
-bool DictSet::AppendDict(Dict *newDict, DictKey const & name)
+bool DictSet::AppendDict(Dict *newDict, DictKey const &name)
 {
    Dicts[name] = newDict;
 
index 89b1ff883c9da962ffe99442d1f297ea0d7abffc..abf1a0f6bb5761c83495ea9673a1e1ce94db7f48 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/05 15:38:28 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.32 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,24 +44,24 @@ public:
    DictSet();
    ~DictSet();
 
-   void Print(std::ostreamos);
+   void Print(std::ostream &os);
 
-   EntryNamesList * GetPubDictEntryNames();
-   EntryNamesByCatMap * GetPubDictEntryNamesByCategory();
+   EntryNamesList *GetPubDictEntryNames();
+   EntryNamesByCatMap* GetPubDictEntryNamesByCategory();
 
-   Dict* LoadDictFromFile( std::string const & fileName,
-                           DictKey const & name );
+   Dict *LoadDictFromFile( std::string const &fileName,
+                           DictKey const &name );
 
-   Dict* GetDict( DictKey const & DictName );
+   Dict *GetDict( DictKey const &DictName );
 
    /// \brief   Retrieve the default reference DICOM V3 public dictionary.
    Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); };
 
    // \brief   Retrieve the virtual reference DICOM dictionary.
    // \warning : not end user intended
-   // DictGetVirtualDict() { return &VirtualEntry; };
+   // Dict *GetVirtualDict() { return &VirtualEntry; };
 
-   DictEntryNewVirtualDictEntry(uint16_t group, uint16_t element,
+   DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t element,
                                   TagName vr     = GDCM_UNKNOWN,
                                   TagName fourth = GDCM_UNKNOWN,
                                   TagName name   = GDCM_UNKNOWN);
@@ -69,7 +69,7 @@ public:
    static std::string BuildDictPath();
 
 protected:
-   bool AppendDict(Dict *NewDict, DictKey const & name);
+   bool AppendDict(Dict *NewDict, DictKey const &name);
 
 private:
    /// Hash table of all dictionaries contained in this DictSet
index ca5c5fa1fc38b1ffae0ff13dfb870f56d4e5e087..c363f7b8e90f32bed7755173e1174b1733f498db 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDirList.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/12 13:32:23 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -43,7 +43,7 @@ namespace gdcm
  * @param  dirName root directory name
  * @param  recursive whether we want to explore recursively or not 
  */
-DirList::DirList(std::string const & dirName, bool recursive)
+DirList::DirList(std::string const &dirName, bool recursive)
 {
    name = dirName;
    Util::NormalizePath(name);
@@ -68,7 +68,7 @@ DirList::~DirList()
  * \brief   Get the directory name
  * @return the directory name 
  */
-std::string const & DirList::GetDirName() const
+std::string const &DirList::GetDirName() const
 {
    return name;
 }
@@ -85,7 +85,7 @@ std::string const & DirList::GetDirName() const
  * @param  dirpath   directory to explore
  * @param  recursive whether we want recursion or not
  */
-int DirList::Explore(std::string const & dirpath, bool recursive)
+int DirList::Explore(std::string const &dirpath, bool recursive)
 {
    int numberOfFiles = 0;
    std::string fileName;
@@ -112,7 +112,7 @@ int DirList::Explore(std::string const & dirpath, bool recursive)
          numberOfFiles++;
       }
 
-      found = FindNextFile(hFile,&fileData);
+      found = FindNextFile(hFile, &fileData);
    }
 
 #else
@@ -131,7 +131,7 @@ int DirList::Explore(std::string const & dirpath, bool recursive)
    // bility  of  your  programs.
 
    struct stat buf;
-   direntd = 0;
+   dirent *d = 0;
    for (d = readdir(dir); d; d = readdir(dir))
    {
       fileName = dirName + d->d_name;
index 47a55050fc199aed111fc58e515745fccc7d1b85..2685ca37d7d20bb767fd687184a264eecd3afc7e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDirList.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/27 22:58:06 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,10 +38,10 @@ namespace gdcm
 class DirList: public std::list<std::string>
 {
 public :
-   DirList(std::string const & dirName, bool recursive=false);
+   DirList(std::string const &dirName, bool recursive=false);
    virtual ~DirList();
 
-   std::string const & GetDirName() const;
+   std::string const &GetDirName() const;
 
    /// Character '\' 
    static const char SEPARATOR_X;
@@ -51,7 +51,7 @@ public :
    static const std::string SEPARATOR;
 
 private :
-   int Explore(std::string const & dirName, bool recursive=false);
+   int Explore(std::string const &dirName, bool recursive=false);
 
    /// name of the root directory to explore
    std::string name;
index f954dfc242c22c3701d42509c78d03f44e2f0fe9..8c750d71769c2ba7b3ed59466d8b3afcde4d8a25 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 13:35:38 $
-  Version:   $Revision: 1.37 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.38 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,7 +38,7 @@ namespace gdcm
  * \brief   Constructor from a given DictEntry
  * @param   in Pointer to existing dictionary entry
  */
-DocEntry::DocEntry(DictEntryin)
+DocEntry::DocEntry(DictEntry *in)
 {
    ImplicitVR = false;
    DicomDict  = in;
@@ -57,7 +57,7 @@ DocEntry::DocEntry(DictEntry* in)
  * \brief   Prints the common part of ValEntry, BinEntry, SeqEntry
  * @param   os ostream we want to print in
  */
-void DocEntry::Print(std::ostreamos)
+void DocEntry::Print(std::ostream &os)
 {
    size_t o;
    std::string st;
@@ -120,7 +120,7 @@ void DocEntry::Print(std::ostream& os)
  * @param fp already open file pointer
  * @param filetype type of the file to be written
  */
-void DocEntry::WriteContent(std::ofstreamfp, FileType filetype)
+void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    uint32_t ffff  = 0xffffffff;
    uint16_t group = GetGroup();
@@ -244,7 +244,7 @@ uint32_t DocEntry::GetFullLength()
  * \ingroup DocEntry
  * \brief   Copies all the attributes from an other DocEntry 
  */
-void DocEntry::Copy (DocEntrye)
+void DocEntry::Copy (DocEntry *e)
 {
 //   DicomDict    = e->DicomDict;
    UsableLength = e->UsableLength;
index 52707ee18d17733f724079e26467456cb5160133..e2798a2651824e04dadba83128bd4ee05a764687 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  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
@@ -50,19 +50,19 @@ public:
    uint16_t      GetElement()   { return DicomDict->GetElement();};
 
    /// Returns the 'key' of the current Dicom Header Entry
-   void  SetKey( TagKey const & key ) { Key = key; }
+   void  SetKey( TagKey const &key ) { Key = key; }
 
    /// Returns the 'key' of the current Dicom Header Entry
-   std::string const & GetKey() const { return Key; }
+   std::string const &GetKey() const { return Key; }
 
    /// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
    /// Dictionnary of the current Dicom Header Entry
-   std::string const & GetName() const { return DicomDict->GetName(); };
+   std::string const &GetName() const { return DicomDict->GetName(); };
 
    /// \brief Returns the 'Value Representation' (e.g. "PN" : Person Name,
    /// "SL" : Signed Long), found in the Dicom Header or in the Dicom
    /// Dictionnary, of the current Dicom Header Entry
-   std::string const & GetVR() const { return DicomDict->GetVR(); };
+   std::string const &GetVR() const { return DicomDict->GetVR(); };
 
    /// \brief Returns offset (since the beginning of the file, including
    /// the File Preamble, if any) of the value of the current Dicom HeaderEntry
@@ -81,7 +81,7 @@ public:
    uint32_t GetReadLength() { return ReadLength; };
 
    /// Sets the 'Value Representation' of the current Dicom Header Entry
-   void SetVR( TagName const & v) { DicomDict->SetVR(v); };    
+   void SetVR( TagName const &v) { DicomDict->SetVR(v); };    
 
    /// \brief Sets both 'Read Length' and 'Usable Length' of the current
    /// Dicom Header Entry
@@ -130,7 +130,7 @@ public:
    bool IsItemDelimitor();
    bool IsSequenceDelimitor();   
 
-   virtual void Print (std::ostream & os = std::cout); 
+   virtual void Print (std::ostream &os = std::cout); 
 
 private:
    // FIXME: In fact we should be more specific and use :
index 2203ac951c749ef69e5ebf0e53cd0a80df2e3e3b..f554901a20d83ae59cd71b66c5612e5619384883 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:20:53 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,31 +70,32 @@ public:
    /// \brief write any type of entry to the entry set
    virtual void WriteContent (std::ofstream *fp, FileType filetype) = 0;// pure virtual
 
-   virtual DocEntryGetDocEntryByNumber(uint16_t group,
+   virtual DocEntry *GetDocEntryByNumber(uint16_t group,
                                          uint16_t elem) = 0;
-   DocEntry* GetDocEntryByName(TagName const & name);
+   DocEntry *GetDocEntryByName(TagName const &name);
    virtual std::string GetEntryByNumber(uint16_t group, uint16_t elem) = 0;
-   std::string GetEntryByName(TagName const & name);
+   std::string GetEntryByName(TagName const &name);
 
-   DictEntryNewVirtualDictEntry(uint16_t group, 
+   DictEntry *NewVirtualDictEntry(uint16_t group, 
                                   uint16_t element,
-                                  TagName const & vr     = GDCM_UNKNOWN,
-                                  TagName const & fourth = GDCM_UNKNOWN,
-                                  TagName const & name   = GDCM_UNKNOWN );
+                                  TagName const &vr     = GDCM_UNKNOWN,
+                                  TagName const &fourth = GDCM_UNKNOWN,
+                                  TagName const &name   = GDCM_UNKNOWN );
   
 protected:
 // DocEntry  related utilities 
-   ValEntry* NewValEntryByNumber(uint16_t group,uint16_t elem,
-                                 TagName const & vr = GDCM_UNKNOWN);
-   BinEntry* NewBinEntryByNumber(uint16_t group,uint16_t elem,
-                                 TagName const & vr = GDCM_UNKNOWN);
-   SeqEntry* NewSeqEntryByNumber(uint16_t group,uint16_t elem);
+
+   ValEntry *NewValEntryByNumber(uint16_t group,uint16_t elem,
+                                 TagName const &vr = GDCM_UNKNOWN);
+   BinEntry *NewBinEntryByNumber(uint16_t group,uint16_t elem,
+                                 TagName const &vr = GDCM_UNKNOWN);
+   SeqEntry *NewSeqEntryByNumber(uint16_t group,uint16_t elem);
 
 // DictEntry  related utilities
-   DictEntry *GetDictEntryByName  (TagName const & name);
+   DictEntry *GetDictEntryByName  (TagName const &name);
    DictEntry *GetDictEntryByNumber(uint16_t group, uint16_t elem);
    DictEntry *GetDictEntryByNumber(uint16_t group, uint16_t elem,
-                                   TagName const & vr);
+                                   TagName const &vr);
 };
 
 } // end namespace gdcm
index 4935b4caa4bd261507abdf8af49be813518e3861..2c705af22df48a1ece6ea8bedfeec4c28ea465ff 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:16:15 $
-  Version:   $Revision: 1.160 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.161 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -94,7 +94,7 @@ const unsigned int Document::MAX_SIZE_PRINT_ELEMENT_VALUE = 0x7fffffff;
  * \brief   constructor  
  * @param   filename file to be opened for parsing
  */
-Document::Document( std::string const & filename ) : ElementSet(-1)
+Document::Document( std::string const &filename ) : ElementSet(-1)
 {
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE); 
    Filename = filename;
@@ -217,7 +217,7 @@ Document::~Document ()
   * \brief   Prints The Dict Entries of THE public Dicom Dictionary
   * @return
   */  
-void Document::PrintPubDict(std::ostream & os)
+void Document::PrintPubDict(std::ostream &os)
 {
    RefPubDict->SetPrintLevel(PrintLevel);
    RefPubDict->Print(os);
@@ -227,7 +227,7 @@ void Document::PrintPubDict(std::ostream & os)
   * \brief   Prints The Dict Entries of THE shadow Dicom Dictionary
   * @return
   */
-void Document::PrintShaDict(std::ostream & os)
+void Document::PrintShaDict(std::ostream &os)
 {
    RefShaDict->SetPrintLevel(PrintLevel);
    RefShaDict->Print(os);
@@ -238,7 +238,7 @@ void Document::PrintShaDict(std::ostream & os)
 /**
  * \brief   Get the public dictionary used
  */
-DictDocument::GetPubDict()
+Dict *Document::GetPubDict()
 {
    return RefPubDict;
 }
@@ -246,14 +246,14 @@ Dict* Document::GetPubDict()
 /**
  * \brief   Get the shadow dictionary used
  */
-DictDocument::GetShaDict()
+Dict *Document::GetShaDict()
 {
    return RefShaDict;
 }
 
 /**
  * \brief   Set the shadow dictionary used
- * \param   dict dictionary to use in shadow
+ * @param   dict dictionary to use in shadow
  */
 bool Document::SetShaDict(Dict *dict)
 {
@@ -263,9 +263,9 @@ bool Document::SetShaDict(Dict *dict)
 
 /**
  * \brief   Set the shadow dictionary used
- * \param   dictName name of the dictionary to use in shadow
+ * @param   dictName name of the dictionary to use in shadow
  */
-bool Document::SetShaDict(DictKey const & dictName)
+bool Document::SetShaDict(DictKey const &dictName)
 {
    RefShaDict = Global::GetDicts()->GetDict(dictName);
    return !RefShaDict;
@@ -314,7 +314,7 @@ TransferSyntaxType Document::GetTransferSyntax()
    // The entry might be present but not loaded (parsing and loading
    // happen at different stages): try loading and proceed with check...
    LoadDocEntrySafe(entry);
-   if (ValEntryvalEntry = dynamic_cast< ValEntry* >(entry) )
+   if (ValEntry *valEntry = dynamic_cast< ValEntry* >(entry) )
    {
       std::string transfer = valEntry->GetValue();
       // The actual transfer (as read from disk) might be padded. We
@@ -415,7 +415,7 @@ FileType Document::GetFileType()
  *         checks the preamble when existing.
  * @return The FILE pointer on success. 
  */
-std::ifstreamDocument::OpenFile()
+std::ifstream *Document::OpenFile()
 {
    if (Filename.length() == 0) 
    {
@@ -503,7 +503,7 @@ bool Document::CloseFile()
  *          (ACR-NEMA, ExplicitVR, ImplicitVR)
  * \return Always true.
  */
-void Document::WriteContent(std::ofstreamfp, FileType filetype)
+void Document::WriteContent(std::ofstream *fp, FileType filetype)
 {
    /// \todo move the following lines (and a lot of others, to be written)
    /// to a future function CheckAndCorrectHeader  
@@ -544,13 +544,13 @@ void Document::WriteContent(std::ofstream* fp, FileType filetype)
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */ 
-ValEntry* Document::ReplaceOrCreateByNumber(std::string const & value, 
+ValEntry *Document::ReplaceOrCreateByNumber(std::string const &value, 
                                             uint16_t group, 
                                             uint16_t elem,
-                                            TagName const & vr )
+                                            TagName const &vr )
 {
-   ValEntryvalEntry = 0;
-   DocEntrycurrentEntry = GetDocEntryByNumber( group, elem);
+   ValEntry *valEntry = 0;
+   DocEntry *currentEntry = GetDocEntryByNumber( group, elem);
    
    if (currentEntry)
    {
@@ -605,14 +605,14 @@ ValEntry* Document::ReplaceOrCreateByNumber(std::string const & value,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
-BinEntry* Document::ReplaceOrCreateByNumber(uint8_t* binArea,
+BinEntry *Document::ReplaceOrCreateByNumber(uint8_t *binArea,
                                             int lgth, 
                                             uint16_t group, 
                                             uint16_t elem,
-                                            TagName const & vr )
+                                            TagName const &vr )
 {
-   BinEntrybinEntry = 0;
-   DocEntrycurrentEntry = GetDocEntryByNumber( group, elem);
+   BinEntry *binEntry = 0;
+   DocEntry *currentEntry = GetDocEntryByNumber( group, elem);
 
    // Verify the currentEntry
    if (currentEntry)
@@ -682,10 +682,10 @@ BinEntry* Document::ReplaceOrCreateByNumber(uint8_t* binArea,
  * \return  pointer to the modified/created SeqEntry (NULL when creation
  *          failed).
  */
-SeqEntryDocument::ReplaceOrCreateByNumber( uint16_t group, uint16_t elem)
+SeqEntry *Document::ReplaceOrCreateByNumber( uint16_t group, uint16_t elem)
 {
-   SeqEntryseqEntry = 0;
-   DocEntrycurrentEntry = GetDocEntryByNumber( group, elem);
+   SeqEntry *seqEntry = 0;
+   DocEntry *currentEntry = GetDocEntryByNumber( group, elem);
 
    // Verify the currentEntry
    if (currentEntry)
@@ -736,7 +736,7 @@ SeqEntry* Document::ReplaceOrCreateByNumber( uint16_t group, uint16_t elem)
  * @param elem element number of the Entry
  * \return  boolean 
  */
-bool Document::ReplaceIfExistByNumber(std::string const & value, 
+bool Document::ReplaceIfExistByNumber(std::string const &value, 
                                       uint16_t group, uint16_t elem ) 
 {
    SetEntryByNumber(value, group, elem);
@@ -773,9 +773,9 @@ bool Document::CheckIfEntryExistByNumber(uint16_t group, uint16_t element )
  * @return  Corresponding element value when it exists,
  *          and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
  */
-std::string Document::GetEntryByName(TagName const & tagName)
+std::string Document::GetEntryByName(TagName const &tagName)
 {
-   DictEntrydictEntry = RefPubDict->GetDictEntryByName(tagName); 
+   DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
    if( !dictEntry )
    {
       return GDCM_UNFOUND;
@@ -805,7 +805,7 @@ std::string Document::GetEntryVRByName(TagName const& tagName)
       return GDCM_UNFOUND;
    }
 
-   DocEntryelem = GetDocEntryByNumber(dictEntry->GetGroup(),
+   DocEntry *elem = GetDocEntryByNumber(dictEntry->GetGroup(),
                                         dictEntry->GetElement());
    return elem->GetVR();
 }
@@ -846,7 +846,7 @@ std::string Document::GetEntryByNumber(uint16_t group, uint16_t element)
  */
 std::string Document::GetEntryVRByNumber(uint16_t group, uint16_t element)
 {
-   DocEntryelem = GetDocEntryByNumber(group, element);
+   DocEntry *elem = GetDocEntryByNumber(group, element);
    if ( !elem )
    {
       return GDCM_UNFOUND;
@@ -864,7 +864,7 @@ std::string Document::GetEntryVRByNumber(uint16_t group, uint16_t element)
  */
 int Document::GetEntryLengthByNumber(uint16_t group, uint16_t element)
 {
-   DocEntryelem =  GetDocEntryByNumber(group, element);
+   DocEntry *elem =  GetDocEntryByNumber(group, element);
    if ( !elem )
    {
       return -2;  //magic number
@@ -877,8 +877,8 @@ int Document::GetEntryLengthByNumber(uint16_t group, uint16_t element)
  * @param   tagName name of the searched Dicom Element.
  * @return  true when found
  */
-bool Document::SetEntryByName( std::string const & content,
-                               TagName const & tagName)
+bool Document::SetEntryByName( std::string const &content,
+                               TagName const &tagName)
 {
    DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
    if( !dictEntry )
@@ -901,7 +901,7 @@ bool Document::SetEntryByName( std::string const & content,
 bool Document::SetEntryByNumber(std::string const& content, 
                                 uint16_t group, uint16_t element) 
 {
-   ValEntryentry = GetValEntryByNumber(group, element);
+   ValEntry *entry = GetValEntryByNumber(group, element);
    if (!entry )
    {
       dbg.Verbose(0, "Document::SetEntryByNumber: no corresponding",
@@ -923,7 +923,7 @@ bool Document::SetEntryByNumber(std::string const& content,
 bool Document::SetEntryByNumber(uint8_t*content, int lgth, 
                                 uint16_t group, uint16_t element) 
 {
-   BinEntryentry = GetBinEntryByNumber(group, element);
+   BinEntry *entry = GetBinEntryByNumber(group, element);
    if (!entry )
    {
       dbg.Verbose(0, "Document::SetEntryByNumber: no corresponding",
@@ -940,7 +940,7 @@ bool Document::SetEntryByNumber(uint8_t*content, int lgth,
  * @param  content new value (string) to substitute with
  * @param  entry Entry to be modified
  */
-bool Document::SetEntry(std::string const & content,ValEntry* entry)
+bool Document::SetEntry(std::string const &content,ValEntry *entry)
 {
    if(entry)
    {
@@ -957,7 +957,7 @@ bool Document::SetEntry(std::string const & content,ValEntry* entry)
  * @param  entry Entry to be modified 
  * @param   lgth new value length
  */
-bool Document::SetEntry(uint8_t* content, int lgth, BinEntry* entry)
+bool Document::SetEntry(uint8_t *content, int lgth, BinEntry *entry)
 {
    if(entry)
    {
@@ -983,15 +983,15 @@ bool Document::SetEntry(uint8_t* content, int lgth, BinEntry* entry)
  * @param elem  element number of the Entry
  * @return Pointer to the 'non string' area
  */
-void*  Document::GetEntryBinAreaByNumber(uint16_t group, uint16_t elem) 
+void *Document::GetEntryBinAreaByNumber(uint16_t group, uint16_t elem) 
 {
-   DocEntryentry = GetDocEntryByNumber(group, elem);
+   DocEntry *entry = GetDocEntryByNumber(group, elem);
    if (!entry) 
    {
       dbg.Verbose(1, "Document::GetDocEntryByNumber: no entry");
       return 0;
    }
-   if ( BinEntrybinEntry = dynamic_cast<BinEntry*>(entry) )
+   if ( BinEntry *binEntry = dynamic_cast<BinEntry*>(entry) )
    {
       return binEntry->GetBinArea();
    }
@@ -1024,7 +1024,7 @@ void Document::LoadEntryBinArea(uint16_t group, uint16_t elem)
  *                when a string is not suitable
  * @param element  Entry whose binArea is going to be loaded
  */
-void Document::LoadEntryBinArea(BinEntryelement) 
+void Document::LoadEntryBinArea(BinEntry *element) 
 {
    if(element->GetBinArea())
       return;
@@ -1037,7 +1037,7 @@ void Document::LoadEntryBinArea(BinEntry* element)
    Fp->seekg(o, std::ios::beg);
 
    size_t l = element->GetLength();
-   uint8_ta = new uint8_t[l];
+   uint8_t *a = new uint8_t[l];
    if( !a )
    {
       dbg.Verbose(0, "Document::LoadEntryBinArea cannot allocate a");
@@ -1065,16 +1065,16 @@ void Document::LoadEntryBinArea(BinEntry* element)
  * @param   element Element number of the searched Dicom Element 
  * @return  
  */
-/*bool Document::SetEntryBinAreaByNumber(uint8_tarea,
+/*bool Document::SetEntryBinAreaByNumber(uint8_t *area,
                                        uint16_t group, uint16_t element) 
 {
-   DocEntrycurrentEntry = GetDocEntryByNumber(group, element);
+   DocEntry *currentEntry = GetDocEntryByNumber(group, element);
    if ( !currentEntry )
    {
       return false;
    }
 
-   if ( BinEntrybinEntry = dynamic_cast<BinEntry*>(currentEntry) )
+   if ( BinEntry *binEntry = dynamic_cast<BinEntry*>(currentEntry) )
    {
       binEntry->SetBinArea( area );
       return true;
@@ -1090,7 +1090,7 @@ void Document::LoadEntryBinArea(BinEntry* element)
  * @return  Corresponding Dicom Element when it exists, and NULL
  *          otherwise.
  */
-DocEntry* Document::GetDocEntryByName(TagName const & tagName)
+DocEntry *Document::GetDocEntryByName(TagName const &tagName)
 {
    DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
    if( !dictEntry )
@@ -1111,7 +1111,7 @@ DocEntry* Document::GetDocEntryByName(TagName const & tagName)
  * @param   element Element number of the searched Dicom Element 
  * @return  
  */
-DocEntryDocument::GetDocEntryByNumber(uint16_t group, uint16_t element) 
+DocEntry *Document::GetDocEntryByNumber(uint16_t group, uint16_t element) 
 {
    TagKey key = DictEntry::TranslateToKey(group, element);
    if ( !TagHT.count(key))
@@ -1127,14 +1127,14 @@ DocEntry* Document::GetDocEntryByNumber(uint16_t group, uint16_t element)
  *         ValEntry.
  * @return When present, the corresponding ValEntry. 
  */
-ValEntryDocument::GetValEntryByNumber(uint16_t group, uint16_t element)
+ValEntry *Document::GetValEntryByNumber(uint16_t group, uint16_t element)
 {
-   DocEntrycurrentEntry = GetDocEntryByNumber(group, element);
+   DocEntry *currentEntry = GetDocEntryByNumber(group, element);
    if ( !currentEntry )
    {
       return 0;
    }
-   if ( ValEntryentry = dynamic_cast<ValEntry*>(currentEntry) )
+   if ( ValEntry *entry = dynamic_cast<ValEntry*>(currentEntry) )
    {
       return entry;
    }
@@ -1149,14 +1149,14 @@ ValEntry* Document::GetValEntryByNumber(uint16_t group, uint16_t element)
  *         BinEntry.
  * @return When present, the corresponding BinEntry. 
  */
-BinEntryDocument::GetBinEntryByNumber(uint16_t group, uint16_t element)
+BinEntry *Document::GetBinEntryByNumber(uint16_t group, uint16_t element)
 {
-   DocEntrycurrentEntry = GetDocEntryByNumber(group, element);
+   DocEntry *currentEntry = GetDocEntryByNumber(group, element);
    if ( !currentEntry )
    {
       return 0;
    }
-   if ( BinEntryentry = dynamic_cast<BinEntry*>(currentEntry) )
+   if ( BinEntry *entry = dynamic_cast<BinEntry*>(currentEntry) )
    {
       return entry;
    }
@@ -1167,12 +1167,12 @@ BinEntry* Document::GetBinEntryByNumber(uint16_t group, uint16_t element)
 
 /**
  * \brief         Loads the element while preserving the current
- *                underlying file position indicator as opposed to
+ *               underlying file position indicator as opposed to
  *                to LoadDocEntry that modifies it.
  * @param entry   Header Entry whose value shall be loaded. 
  * @return  
  */
-void Document::LoadDocEntrySafe(DocEntry * entry)
+void Document::LoadDocEntrySafe(DocEntry *entry)
 {
    if(Fp)
    {
@@ -1256,9 +1256,9 @@ void Document::ParseDES(DocEntrySet *set, long offset,
                         long l_max, bool delim_mode)
 {
    DocEntry *newDocEntry = 0;
-   ValEntrynewValEntry;
-   BinEntrynewBinEntry;
-   SeqEntrynewSeqEntry;
+   ValEntry *newValEntry;
+   BinEntry *newBinEntry;
+   SeqEntry *newSeqEntry;
    VRKey vr;
    bool used=false;
    long offsetEntry,readEntry;
@@ -1299,7 +1299,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          //////////////////// BinEntry or UNKOWN VR:
             // When "this" is a Document the Key is simply of the
             // form ( group, elem )...
-            if (Documentdummy = dynamic_cast< Document* > ( set ) )
+            if (Document *dummy = dynamic_cast< Document* > ( set ) )
             {
                (void)dummy;
                newBinEntry->SetKey( newBinEntry->GetKey() );
@@ -1307,7 +1307,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             // but when "this" is a SQItem, we are inserting this new
             // valEntry in a sequence item, and the kay has the
             // generalized form (refer to \ref BaseTagKey):
-            if (SQItemparentSQItem = dynamic_cast< SQItem* > ( set ) )
+            if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
             {
                newBinEntry->SetKey(  parentSQItem->GetBaseTagKey()
                                    + newBinEntry->GetKey() );
@@ -1326,7 +1326,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          /////////////////////// ValEntry
             // When "set" is a Document, then we are at the top of the
             // hierarchy and the Key is simply of the form ( group, elem )...
-            if (Documentdummy = dynamic_cast< Document* > ( set ) )
+            if (Document *dummy = dynamic_cast< Document* > ( set ) )
             {
                (void)dummy;
                newValEntry->SetKey( newValEntry->GetKey() );
@@ -1334,7 +1334,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             // ...but when "set" is a SQItem, we are inserting this new
             // valEntry in a sequence item. Hence the key has the
             // generalized form (refer to \ref BaseTagKey):
-            if (SQItemparentSQItem = dynamic_cast< SQItem* > ( set ) )
+            if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
             {
                newValEntry->SetKey(  parentSQItem->GetBaseTagKey()
                                    + newValEntry->GetKey() );
@@ -1408,7 +1408,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          // is a Document, then we are building the first depth level.
          // Hence the SeqEntry we are building simply has a depth
          // level of one:
-         if (Documentdummy = dynamic_cast< Document* > ( set ) )
+         if (Document *dummy = dynamic_cast< Document* > ( set ) )
          {
             (void)dummy;
             newSeqEntry->SetDepthLevel( 1 );
@@ -1417,7 +1417,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          // But when "set" is allready a SQItem, we are building a nested
          // sequence, and hence the depth level of the new SeqEntry
          // we are building, is one level deeper:
-         if (SQItemparentSQItem = dynamic_cast< SQItem* > ( set ) )
+         if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
          {
             newSeqEntry->SetDepthLevel( parentSQItem->GetDepthLevel() + 1 );
             newSeqEntry->SetKey(  parentSQItem->GetBaseTagKey()
@@ -1446,7 +1446,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
  * \brief   Parses a Sequence ( SeqEntry after SeqEntry)
  * @return  parsed length for this level
  */ 
-void Document::ParseSQ( SeqEntryseqEntry,
+void Document::ParseSQ( SeqEntry *seqEntry,
                         long offset, long l_max, bool delim_mode)
 {
    int SQItemNumber = 0;
@@ -1454,7 +1454,7 @@ void Document::ParseSQ( SeqEntry* seqEntry,
 
    while (true)
    {
-      DocEntrynewDocEntry = ReadNextDocEntry();   
+      DocEntry *newDocEntry = ReadNextDocEntry();   
       if ( !newDocEntry )
       {
          // FIXME Should warn user
@@ -1509,7 +1509,7 @@ void Document::ParseSQ( SeqEntry* seqEntry,
  *                the value specified with Document::SetMaxSizeLoadEntry()
  * @param         entry Header Entry (Dicom Element) to be dealt with
  */
-void Document::LoadDocEntry(DocEntryentry)
+void Document::LoadDocEntry(DocEntry *entry)
 {
    uint16_t group  = entry->GetGroup();
    std::string  vr = entry->GetVR();
@@ -1541,7 +1541,7 @@ void Document::LoadDocEntry(DocEntry* entry)
    std::ostringstream s;
    if (length > MaxSizeLoadEntry)
    {
-      if (BinEntrybinEntryPtr = dynamic_cast< BinEntry* >(entry) )
+      if (BinEntry *binEntryPtr = dynamic_cast< BinEntry* >(entry) )
       {  
          //s << "gdcm::NotLoaded (BinEntry)";
          s << GDCM_NOTLOADED;
@@ -1551,7 +1551,7 @@ void Document::LoadDocEntry(DocEntry* entry)
          binEntryPtr->SetValue(s.str());
       }
       // Be carefull : a BinEntry IS_A ValEntry ... 
-      else if (ValEntryvalEntryPtr = dynamic_cast< ValEntry* >(entry) )
+      else if (ValEntry *valEntryPtr = dynamic_cast< ValEntry* >(entry) )
       {
         // s << "gdcm::NotLoaded. (ValEntry)";
          s << GDCM_NOTLOADED;  
@@ -1574,7 +1574,7 @@ void Document::LoadDocEntry(DocEntry* entry)
    }
 
    // When we find a BinEntry not very much can be done :
-   if (BinEntrybinEntryPtr = dynamic_cast< BinEntry* >(entry) )
+   if (BinEntry *binEntryPtr = dynamic_cast< BinEntry* >(entry) )
    {
       s << GDCM_BINLOADED;
       binEntryPtr->SetValue(s.str());
@@ -1651,7 +1651,7 @@ void Document::LoadDocEntry(DocEntry* entry)
    }
    delete[] str;
 
-   if ( ValEntryvalEntry = dynamic_cast<ValEntry* >(entry) )
+   if ( ValEntry *valEntry = dynamic_cast<ValEntry* >(entry) )
    {
       if ( Fp->fail() || Fp->eof())//Fp->gcount() == 1
       {
@@ -1775,7 +1775,7 @@ void Document::FindDocEntryLength( DocEntry *entry )
          // and the dictionary entry depending on them.
          uint16_t correctGroup = SwapShort( entry->GetGroup() );
          uint16_t correctElem  = SwapShort( entry->GetElement() );
-         DictEntrynewTag = GetDictEntryByNumber( correctGroup,
+         DictEntry *newTag = GetDictEntryByNumber( correctGroup,
                                                        correctElem );
          if ( !newTag )
          {
@@ -1942,7 +1942,7 @@ std::string Document::GetDocEntryValue(DocEntry *entry)
  * @param   entry Entry to reverse transform
  * @return  Reverse transformed entry value
  */
-std::string Document::GetDocEntryUnvalue(DocEntryentry)
+std::string Document::GetDocEntryUnvalue(DocEntry *entry)
 {
    if ( IsDocEntryAnInteger(entry) && entry->IsImplicitVR() )
    {
@@ -2003,7 +2003,9 @@ void Document::SkipDocEntry(DocEntry *entry)
 /**
  * \brief   Skips to the begining of the next Header Entry 
  * \warning NOT end user intended method !
- * @param   entry entry to skip
+ * @param   offset start of skipping
+ * @param   readLgth length to skip
+
  */
 void Document::SkipToNextDocEntry(long offset,long readLgth) 
 {
@@ -2101,7 +2103,7 @@ bool Document::IsDocEntryAnInteger(DocEntry *entry)
 {
    uint16_t element = entry->GetElement();
    uint16_t group   = entry->GetGroup();
-   const std::string & vr  = entry->GetVR();
+   const std::string &vr  = entry->GetVR();
    uint32_t length  = entry->GetLength();
 
    // When we have some semantics on the element we just read, and if we
@@ -2568,7 +2570,7 @@ void Document::HandleBrokenEndian(uint16_t group, uint16_t elem)
  *          gets the VR, gets the length, gets the offset value)
  * @return  On succes the newly created DocEntry, NULL on failure.      
  */
-DocEntryDocument::ReadNextDocEntry()
+DocEntry *Document::ReadNextDocEntry()
 {
    uint16_t group;
    uint16_t elem;
@@ -2760,7 +2762,7 @@ void Document::ReadAndSkipEncapsulatedBasicOffsetTable()
    //          lengths, but we won't bother with such fuses for the time being.
    if ( itemLength != 0 )
    {
-      charbasicOffsetTableItemValue = new char[itemLength + 1];
+      char *basicOffsetTableItemValue = new char[itemLength + 1];
       Fp->read(basicOffsetTableItemValue, itemLength);
 
 #ifdef GDCM_DEBUG
@@ -2859,7 +2861,7 @@ void Document::ComputeRLEInfo()
        SkipBytes(rleSegmentLength[nbRleSegments]);
 
        // Store the collected info
-       RLEFramenewFrameInfo = new RLEFrame;
+       RLEFrame *newFrameInfo = new RLEFrame;
        newFrameInfo->NumberFragments = nbRleSegments;
        for( unsigned int uk = 1; uk <= nbRleSegments; uk++ )
        {
@@ -2902,7 +2904,7 @@ void Document::ComputeJPEGFragmentInfo()
       long fragmentOffset = Fp->tellg();
 
        // Store the collected info
-       JPEGFragmentnewFragment = new JPEGFragment;
+       JPEGFragment *newFragment = new JPEGFragment;
        newFragment->Offset = fragmentOffset;
        newFragment->Length = fragmentLength;
        JPEGInfo->Fragments.push_back( newFragment );
@@ -2928,18 +2930,18 @@ void Document::ComputeJPEGFragmentInfo()
  *        when recursively walking the given set.
  * @param set The structure to be traversed (recursively).
  */
-void Document::BuildFlatHashTableRecurse( TagDocEntryHTbuiltHT,
-                                          DocEntrySetset )
+void Document::BuildFlatHashTableRecurse( TagDocEntryHT &builtHT,
+                                          DocEntrySet *set )
 { 
-   if (ElementSetelementSet = dynamic_cast< ElementSet* > ( set ) )
+   if (ElementSet *elementSet = dynamic_cast< ElementSet* > ( set ) )
    {
-      TagDocEntryHT const & currentHT = elementSet->GetTagHT();
+      TagDocEntryHT const &currentHT = elementSet->GetTagHT();
       for( TagDocEntryHT::const_iterator i  = currentHT.begin();
                                          i != currentHT.end();
                                        ++i)
       {
-         DocEntryentry = i->second;
-         if ( SeqEntryseqEntry = dynamic_cast<SeqEntry*>(entry) )
+         DocEntry *entry = i->second;
+         if ( SeqEntry *seqEntry = dynamic_cast<SeqEntry*>(entry) )
          {
             const ListSQItem& items = seqEntry->GetSQItems();
             for( ListSQItem::const_iterator item  = items.begin();
@@ -2955,15 +2957,15 @@ void Document::BuildFlatHashTableRecurse( TagDocEntryHT& builtHT,
       return;
     }
 
-   if (SQItemSQItemSet = dynamic_cast< SQItem* > ( set ) )
+   if (SQItem *SQItemSet = dynamic_cast< SQItem* > ( set ) )
    {
       const ListDocEntry& currentList = SQItemSet->GetDocEntries();
       for (ListDocEntry::const_iterator i  = currentList.begin();
                                         i != currentList.end();
                                       ++i)
       {
-         DocEntryentry = *i;
-         if ( SeqEntryseqEntry = dynamic_cast<SeqEntry*>(entry) )
+         DocEntry *entry = *i;
+         if ( SeqEntry *seqEntry = dynamic_cast<SeqEntry*>(entry) )
          {
             const ListSQItem& items = seqEntry->GetSQItems();
             for( ListSQItem::const_iterator item  = items.begin();
@@ -3003,9 +3005,9 @@ void Document::BuildFlatHashTableRecurse( TagDocEntryHT& builtHT,
  *        \ref BuildFlatHashTable again...
  * @return The flat std::map<> we juste build.
  */
-TagDocEntryHTDocument::BuildFlatHashTable()
+TagDocEntryHT *Document::BuildFlatHashTable()
 {
-   TagDocEntryHTFlatHT = new TagDocEntryHT;
+   TagDocEntryHT *FlatHT = new TagDocEntryHT;
    BuildFlatHashTableRecurse( *FlatHT, this );
    return FlatHT;
 }
index 09ba91d848f73c55423c88b239c89dfc7290d706..e7233eb029fff390ccb7fe075d98c43e2b01e406 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:16:16 $
-  Version:   $Revision: 1.74 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.75 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -74,8 +74,8 @@ public:
    bool IsEncapsulate();
    bool IsDicomV3();
 
-   RLEFramesInfoGetRLEInfo() { return RLEInfo; }
-   JPEGFragmentsInfoGetJPEGInfo() { return JPEGInfo; }
+   RLEFramesInfo *GetRLEInfo() { return RLEInfo; }
+   JPEGFragmentsInfo *GetJPEGInfo() { return JPEGInfo; }
 
 // Dictionnaries
    virtual void PrintPubDict (std::ostream &os = std::cout);
@@ -84,7 +84,7 @@ public:
    Dict* GetPubDict();
    Dict* GetShaDict();
    bool SetShaDict(Dict* dict);
-   bool SetShaDict(DictKey const & dictName);
+   bool SetShaDict(DictKey const &dictName);
 
 // Swap code
    /// 'Swap code' accessor (see \ref SwapCode )
@@ -103,51 +103,51 @@ public:
    /// Accessor to \ref Filename
    const std::string &GetFileName() const { return Filename; }
    /// Accessor to \ref Filename
-   void SetFileName(std::string const & fileName) { Filename = fileName; }
+   void SetFileName(std::string const &fileName) { Filename = fileName; }
 
-   std::ifstreamOpenFile();
+   std::ifstream *OpenFile();
    bool CloseFile();
-   void WriteContent( std::ofstreamfp, FileType type );
+   void WriteContent( std::ofstream *fp, FileType type );
 
 // Content entries
-   virtual bool SetEntryByName  (std::string const & content, 
-                                 TagName const & tagName );
-   virtual bool SetEntryByNumber(std::string const & content,
+   virtual bool SetEntryByName  (std::string const &content, 
+                                 TagName const &tagName );
+   virtual bool SetEntryByNumber(std::string const &content,
                                  uint16_t group, uint16_t element);
-   virtual bool SetEntryByNumber(uint8_tcontent, int lgth,
+   virtual bool SetEntryByNumber(uint8_t *content, int lgth,
                                  uint16_t group, uint16_t element);
-   virtual bool SetEntry(std::string const & content,ValEntry* entry);
-   virtual bool SetEntry(uint8_t* content, int lgth,BinEntry* entry);
+   virtual bool SetEntry(std::string const &content,ValEntry *entry);
+   virtual bool SetEntry(uint8_t *content, int lgth,BinEntry *entry);
 
-   virtual voidGetEntryBinAreaByNumber(uint16_t group, uint16_t elem);   
+   virtual void *GetEntryBinAreaByNumber(uint16_t group, uint16_t elem);   
 
-   virtual std::string GetEntryByName    (TagName const & tagName);
-   virtual std::string GetEntryVRByName  (TagName const & tagName);
+   virtual std::string GetEntryByName    (TagName const &tagName);
+   virtual std::string GetEntryVRByName  (TagName const &tagName);
    virtual std::string GetEntryByNumber  (uint16_t group, uint16_t elem);
    virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
    virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
 
-   DocEntryGetDocEntryByNumber(uint16_t group, uint16_t element); 
-   DocEntry* GetDocEntryByName  (TagName const & tagName);
-   ValEntryGetValEntryByNumber(uint16_t group, uint16_t element); 
-   BinEntryGetBinEntryByNumber(uint16_t group, uint16_t element); 
+   DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element); 
+   DocEntry *GetDocEntryByName  (TagName const &tagName);
+   ValEntry *GetValEntryByNumber(uint16_t group, uint16_t element); 
+   BinEntry *GetBinEntryByNumber(uint16_t group, uint16_t element); 
 
-   ValEntry* ReplaceOrCreateByNumber(std::string const & value,
+   ValEntry *ReplaceOrCreateByNumber(std::string const &value,
                                      uint16_t group, uint16_t elem,
-                                     TagName const & vr = GDCM_UNKNOWN);
-   BinEntryReplaceOrCreateByNumber(uint8_t* binArea, int lgth,
+                                     TagName const &vr = GDCM_UNKNOWN);
+   BinEntry *ReplaceOrCreateByNumber(uint8_t* binArea, int lgth,
                                      uint16_t group, uint16_t elem,
-                                     TagName const & vr = GDCM_UNKNOWN);
-   SeqEntryReplaceOrCreateByNumber(uint16_t group, uint16_t elem);
+                                     TagName const &vr = GDCM_UNKNOWN);
+   SeqEntry *ReplaceOrCreateByNumber(uint16_t group, uint16_t elem);
 
-   bool ReplaceIfExistByNumber ( std::string const & value,
+   bool ReplaceIfExistByNumber ( std::string const &value,
                                  uint16_t group, uint16_t elem );
    
    virtual void LoadEntryBinArea(uint16_t group, uint16_t elem);
-   virtual void LoadEntryBinArea(BinEntryentry);
+   virtual void LoadEntryBinArea(BinEntry *entry);
 
-   void LoadDocEntrySafe(DocEntryentry);
-   TagDocEntryHTBuildFlatHashTable();
+   void LoadDocEntrySafe(DocEntry *entry);
+   TagDocEntryHT *BuildFlatHashTable();
       
 // Divers
    static std::string GetTransferSyntaxValue(TransferSyntaxType type);
@@ -158,7 +158,7 @@ protected:
    // to instanciate from this class Document (only Header and
    // DicomDir are meaningfull).
    Document();
-   Document( std::string const & filename );
+   Document( std::string const &filename );
    virtual ~Document();
    
    void ReadAndSkipEncapsulatedBasicOffsetTable();
@@ -179,7 +179,7 @@ protected:
    int SwapCode;
 
    /// File Pointer, opened during Header parsing.
-   std::ifstreamFp;
+   std::ifstream *Fp;
 
    /// ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown
    FileType Filetype;  
@@ -199,10 +199,10 @@ protected:
    static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE;
 
    /// Store the RLE frames info obtained during parsing of pixels.
-   RLEFramesInfoRLEInfo;
+   RLEFramesInfo *RLEInfo;
 
    /// Store the JPEG fragments info obtained during parsing of pixels.
-   JPEGFragmentsInfoJPEGInfo;
+   JPEGFragmentsInfo *JPEGInfo;
 
 private:
 // Methods
@@ -210,19 +210,20 @@ private:
    void ParseDES(DocEntrySet *set,long offset, long l_max, bool delim_mode);
    void ParseSQ (SeqEntry *seq,   long offset, long l_max, bool delim_mode);
 
-   void LoadDocEntry         (DocEntry *);
-   void FindDocEntryLength   (DocEntry *) throw ( FormatError );
+   void LoadDocEntry         (DocEntry *e);
+   void FindDocEntryLength   (DocEntry *e) throw ( FormatError );
    std::string FindDocEntryVR();
-   bool CheckDocEntryVR      (VRKey);
+   bool CheckDocEntryVR      (VRKey k);
 
-   std::string GetDocEntryValue  (DocEntry *);
-   std::string GetDocEntryUnvalue(DocEntry *);
+   std::string GetDocEntryValue  (DocEntry *e);
+   std::string GetDocEntryUnvalue(DocEntry *e);
 
-   void SkipDocEntry          (DocEntry *);
+
+   void SkipDocEntry          (DocEntry *e);
    void SkipToNextDocEntry    (long offset,long readLgth);
 
-   void FixDocEntryFoundLength(DocEntry *, uint32_t);
-   bool IsDocEntryAnInteger   (DocEntry *);
+   void FixDocEntryFoundLength(DocEntry *e, uint32_t l);
+   bool IsDocEntryAnInteger   (DocEntry *e);
 
    uint32_t FindDocEntryLengthOB() throw( FormatUnexpected );
 
@@ -239,21 +240,21 @@ private:
    void SetMaxSizePrintEntry(long);
 
    // DocEntry related utilities
-   DocEntryReadNextDocEntry();
+   DocEntry *ReadNextDocEntry();
 
    uint32_t GenerateFreeTagKeyInGroup(uint16_t group);
-   void BuildFlatHashTableRecurse( TagDocEntryHTbuiltHT,
+   void BuildFlatHashTableRecurse( TagDocEntryHT &builtHT,
                                    DocEntrySet* set );
 
    void HandleBrokenEndian(uint16_t  group, uint16_t  elem);
 
 // Variables
    /// Public dictionary used to parse this header
-   DictRefPubDict;
+   Dict *RefPubDict;
    
    /// \brief Optional "shadow dictionary" (private elements) used to parse
    /// this header
-   DictRefShaDict;
+   Dict *RefShaDict;
 
    /// \brief Size threshold above which an element value will NOT be loaded
    /// in memory (to avoid loading the image/volume itself). By default,
index 1f99df65691608fc99cd3f32b30297d768cdefd7..ef76254bd4c62f1d6f7d06518aab23f8f1acf821 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.35 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.36 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -61,7 +61,7 @@ ElementSet::~ElementSet()
   *          from the H Table
   * @return
   */ 
-void ElementSet::Print(std::ostreamos)
+void ElementSet::Print(std::ostream &os)
 {
    for( TagDocEntryHT::const_iterator i = TagHT.begin(); i != TagHT.end(); ++i)
    {
@@ -70,7 +70,7 @@ void ElementSet::Print(std::ostream& os)
       entry->SetPrintLevel(PrintLevel);
       entry->Print(os);   
 
-      if ( SeqEntryseqEntry = dynamic_cast<SeqEntry*>(entry) )
+      if ( SeqEntry *seqEntry = dynamic_cast<SeqEntry*>(entry) )
       {
          (void)seqEntry;
          // Avoid the newline for a sequence:
@@ -87,7 +87,7 @@ void ElementSet::Print(std::ostream& os)
   *          from the H Table
   * @return
   */ 
-void ElementSet::WriteContent(std::ofstreamfp, FileType filetype)
+void ElementSet::WriteContent(std::ofstream *fp, FileType filetype)
 {
    for (TagDocEntryHT::const_iterator i = TagHT.begin(); 
                                      i != TagHT.end(); 
@@ -107,9 +107,9 @@ void ElementSet::WriteContent(std::ofstream* fp, FileType filetype)
  * \brief   add a new Dicom Element pointer to the H Table
  * @param   newEntry entry to add
  */
-bool ElementSet::AddEntry(DocEntrynewEntry)
+bool ElementSet::AddEntry(DocEntry *newEntry)
 {
-   const TagKeykey = newEntry->GetKey();
+   const TagKey &key = newEntry->GetKey();
 
    if( TagHT.count(key) == 1 )
    {
@@ -130,9 +130,9 @@ bool ElementSet::AddEntry(DocEntry* newEntry)
  * \warning Some problems when using under Windows... prefer the use of
  *          Initialize / GetNext methods
  */
-bool ElementSet::RemoveEntry( DocEntryentryToRemove)
+bool ElementSet::RemoveEntry( DocEntry *entryToRemove)
 {
-   const TagKeykey = entryToRemove->GetKey();
+   const TagKey &key = entryToRemove->GetKey();
    if( TagHT.count(key) == 1 )
    {
       TagHT.erase(key);
@@ -149,9 +149,9 @@ bool ElementSet::RemoveEntry( DocEntry* entryToRemove)
  * \brief   Clear the hash table from given entry BUT keep the entry.
  * @param   entryToRemove Entry to remove.
  */
-bool ElementSet::RemoveEntryNoDestroy(DocEntryentryToRemove)
+bool ElementSet::RemoveEntryNoDestroy(DocEntry *entryToRemove)
 {
-   const TagKeykey = entryToRemove->GetKey();
+   const TagKey &key = entryToRemove->GetKey();
    if( TagHT.count(key) == 1 )
    {
       TagHT.erase(key);
index 6678c05c366c38027afc4e324b60c2ae67f4eb56..030bbf562c07ae6b81571f68299f1f71a8154981 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:03 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.28 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -52,7 +52,7 @@ public:
    /// Accessor to \ref TagHT
    // Do not expose this to user (public API) ! 
    // A test is using it thus put it in public (matt)
-   TagDocEntryHT const & GetTagHT() const { return TagHT; };
+   TagDocEntryHT const &GetTagHT() const { return TagHT; };
 
    void Initialize();
    DocEntry *GetNextEntry();
index 3bda375a2ef15153a1818bf4b258164be3006973..21184b7826c56d7adaa6b462d677bfba2df830f3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmException.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/04 18:14:34 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,7 +31,7 @@ namespace gdcm
  * @param f
  * @param msg  
  */
-Exception::Exception(const std::string &f, const std::stringmsg) throw()
+Exception::Exception(const std::string &f, const std::string &msg) throw()
 #ifdef __GNUC__
   try
 #endif
index ff0fa67d7758c686acab544e55fa958be07bac45..0be44e78c990f6a5231ecf571047383eabd2e76e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmException.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -69,7 +69,7 @@ public:
    /// returns exception name string
    operator const char *() const throw();
 
-   friend std::ostreamoperator<<(std::ostream &os, const Exception &e);
+   friend std::ostream &operator<<(std::ostream &os, const Exception &e);
 
 protected:
    /// error message part 1
index 70da398efee7dcc7c8fb8be1ffc636eb1cf2f227..cd6ec36b48bc77078dffe8723c58d6c785a33137 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.182 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.183 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -180,7 +180,7 @@ size_t File::GetImageDataRawSize()
  * @return  Pointer to newly allocated pixel data.
  *          NULL if alloc fails 
  */
-uint8_tFile::GetImageData()
+uint8_t *File::GetImageData()
 {
    if ( PixelWriteConverter->GetUserData() )
    {
@@ -213,7 +213,7 @@ uint8_t* File::GetImageData()
  * @return  Pointer to newly allocated pixel data.
  * \        NULL if alloc fails 
  */
-uint8_tFile::GetImageDataRaw ()
+uint8_t *File::GetImageDataRaw ()
 {
    return GetRaw();
 }
@@ -243,7 +243,7 @@ uint8_t* File::GetImageDataRaw ()
  * @return  On success, the number of bytes actually copied. Zero on
  *          failure e.g. MaxSize is lower than necessary.
  */
-size_t File::GetImageDataIntoVector (voiddestination, size_t maxSize)
+size_t File::GetImageDataIntoVector (void *destination, size_t maxSize)
 {
    if ( ! GetRaw() )
    {
@@ -291,7 +291,7 @@ size_t File::GetImageDataIntoVector (void* destination, size_t maxSize)
  *
  * @return boolean
  */
-void File::SetImageData(uint8_tinData, size_t expectedSize)
+void File::SetImageData(uint8_t *inData, size_t expectedSize)
 {
    SetUserData(inData,expectedSize);
 }
@@ -300,23 +300,23 @@ void File::SetImageData(uint8_t* inData, size_t expectedSize)
  * \brief   Set the image datas defined by the user
  * \warning When writting the file, this datas are get as default datas to write
  */
-void File::SetUserData(uint8_tdata, size_t expectedSize)
+void File::SetUserData(uint8_t *data, size_t expectedSize)
 {
    PixelWriteConverter->SetUserData(data,expectedSize);
 }
 
 /**
  * \brief   Get the image datas defined by the user
- * \warning When writting the file, this datas are get as default datas to write
+ * \warning When writting the file, this datas are get as default data to write
  */
-uint8_tFile::GetUserData()
+uint8_t *File::GetUserData()
 {
    return PixelWriteConverter->GetUserData();
 }
 
 /**
  * \brief   Get the image data size defined by the user
- * \warning When writting the file, this datas are get as default datas to write
+ * \warning When writting the file, this datas are get as default data to write
  */
 size_t File::GetUserDataSize()
 {
@@ -325,16 +325,16 @@ size_t File::GetUserDataSize()
 
 /**
  * \brief   Get the image datas from the file.
- *          If a LUT is found, the datas are expanded to be RGB
+ *          If a LUT is found, the data are expanded to be RGB
  */
-uint8_tFile::GetRGBData()
+uint8_t *File::GetRGBData()
 {
    return PixelReadConverter->GetRGB();
 }
 
 /**
  * \brief   Get the image data size from the file.
- *          If a LUT is found, the datas are expanded to be RGB
+ *          If a LUT is found, the data are expanded to be RGB
  */
 size_t File::GetRGBDataSize()
 {
@@ -345,14 +345,14 @@ size_t File::GetRGBDataSize()
  * \brief   Get the image datas from the file.
  *          If a LUT is found, the datas are not expanded !
  */
-uint8_tFile::GetRawData()
+uint8_t *File::GetRawData()
 {
    return PixelReadConverter->GetRaw();
 }
 
 /**
  * \brief   Get the image data size from the file.
- *          If a LUT is found, the datas are not expanded !
+ *          If a LUT is found, the data are not expanded !
  */
 size_t File::GetRawDataSize()
 {
@@ -368,7 +368,7 @@ size_t File::GetRawDataSize()
  * @return false if write fails
  */
 
-bool File::WriteRawData(std::string const & fileName)
+bool File::WriteRawData(std::string const &fileName)
 {
   std::ofstream fp1(fileName.c_str(), std::ios::out | std::ios::binary );
    if (!fp1)
@@ -398,7 +398,7 @@ bool File::WriteRawData(std::string const & fileName)
  * @return false if write fails
  */
 
-bool File::WriteDcmImplVR (std::string const & fileName)
+bool File::WriteDcmImplVR (std::string const &fileName)
 {
    SetWriteTypeToDcmImplVR();
    return Write(fileName);
@@ -413,7 +413,7 @@ bool File::WriteDcmImplVR (std::string const & fileName)
  * @return false if write fails
  */
 
-bool File::WriteDcmExplVR (std::string const & fileName)
+bool File::WriteDcmExplVR (std::string const &fileName)
 {
    SetWriteTypeToDcmExplVR();
    return Write(fileName);
@@ -433,7 +433,7 @@ bool File::WriteDcmExplVR (std::string const & fileName)
  * @return false if write fails
  */
 
-bool File::WriteAcr (std::string const & fileName)
+bool File::WriteAcr (std::string const &fileName)
 {
    SetWriteTypeToAcr();
    return Write(fileName);
@@ -445,7 +445,7 @@ bool File::WriteAcr (std::string const & fileName)
  *                 (any already existing file is overwritten)
  * @return false if write fails
  */
-bool File::Write(std::string constfileName)
+bool File::Write(std::string const &fileName)
 {
    switch(WriteType)
    {
@@ -519,7 +519,7 @@ bool File::Write(std::string const& fileName)
  * @param   group     group number of the Dicom Element to modify
  * @param   element element number of the Dicom Element to modify
  */
-bool File::SetEntryByNumber(std::string constcontent,
+bool File::SetEntryByNumber(std::string const &content,
                             uint16_t group, uint16_t element)
 { 
    return HeaderInternal->SetEntryByNumber(content,group,element);
@@ -535,7 +535,7 @@ bool File::SetEntryByNumber(std::string const& content,
  * @param   group     group number of the Dicom Element to modify
  * @param   element element number of the Dicom Element to modify
  */
-bool File::SetEntryByNumber(uint8_tcontent, int lgth,
+bool File::SetEntryByNumber(uint8_t *content, int lgth,
                             uint16_t group, uint16_t element)
 {
    return HeaderInternal->SetEntryByNumber(content,lgth,group,element);
@@ -550,7 +550,7 @@ bool File::SetEntryByNumber(uint8_t* content, int lgth,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */ 
-bool File::ReplaceOrCreateByNumber(std::string constcontent,
+bool File::ReplaceOrCreateByNumber(std::string const &content,
                                    uint16_t group, uint16_t element)
 {
    return HeaderInternal->ReplaceOrCreateByNumber(content,group,element) != NULL;
@@ -566,7 +566,7 @@ bool File::ReplaceOrCreateByNumber(std::string const& content,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
-bool File::ReplaceOrCreateByNumber(uint8_tbinArea, int lgth,
+bool File::ReplaceOrCreateByNumber(uint8_t *binArea, int lgth,
                                    uint16_t group, uint16_t element)
 {
    return HeaderInternal->ReplaceOrCreateByNumber(binArea,lgth,group,element) != NULL;
@@ -644,7 +644,7 @@ void File::SetWriteToRaw()
    } 
    else
    {
-      ValEntryphotInt = CopyValEntry(0x0028,0x0004);
+      ValEntry *photInt = CopyValEntry(0x0028,0x0004);
       if(HeaderInternal->HasLUT())
       {
          photInt->SetValue("PALETTE COLOR ");
@@ -657,7 +657,7 @@ void File::SetWriteToRaw()
       PixelWriteConverter->SetReadData(PixelReadConverter->GetRaw(),
                                        PixelReadConverter->GetRawSize());
 
-      BinEntrypixel = CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
+      BinEntry *pixel = CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
       pixel->SetValue(GDCM_BINLOADED);
       pixel->SetBinArea(PixelWriteConverter->GetData(),false);
       pixel->SetLength(PixelWriteConverter->GetDataSize());
@@ -673,13 +673,13 @@ void File::SetWriteToRGB()
    {
       PixelReadConverter->BuildRGBImage();
       
-      ValEntryspp = CopyValEntry(0x0028,0x0002);
+      ValEntry *spp = CopyValEntry(0x0028,0x0002);
       spp->SetValue("3 ");
 
-      ValEntryplanConfig = CopyValEntry(0x0028,0x0006);
+      ValEntry *planConfig = CopyValEntry(0x0028,0x0006);
       planConfig->SetValue("0 ");
 
-      ValEntryphotInt = CopyValEntry(0x0028,0x0004);
+      ValEntry *photInt = CopyValEntry(0x0028,0x0004);
       photInt->SetValue("RGB ");
 
       if(PixelReadConverter->GetRGB())
@@ -693,7 +693,7 @@ void File::SetWriteToRGB()
                                           PixelReadConverter->GetRawSize());
       }
 
-      BinEntrypixel = CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
+      BinEntry *pixel = CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
       pixel->SetValue(GDCM_BINLOADED);
       pixel->SetBinArea(PixelWriteConverter->GetData(),false);
       pixel->SetLength(PixelWriteConverter->GetDataSize());
@@ -716,13 +716,13 @@ void File::SetWriteToRGB()
       // samples per pixels = 1 (in the read file)
       if(HeaderInternal->GetBitsAllocated()==24) 
       {
-         ValEntrybitsAlloc = CopyValEntry(0x0028,0x0100);
+         ValEntry *bitsAlloc = CopyValEntry(0x0028,0x0100);
          bitsAlloc->SetValue("8 ");
 
-         ValEntrybitsStored = CopyValEntry(0x0028,0x0101);
+         ValEntry *bitsStored = CopyValEntry(0x0028,0x0101);
          bitsStored->SetValue("8 ");
 
-         ValEntryhighBit = CopyValEntry(0x0028,0x0102);
+         ValEntry *highBit = CopyValEntry(0x0028,0x0102);
          highBit->SetValue("7 ");
 
          Archive->Push(bitsAlloc);
@@ -767,7 +767,7 @@ void File::SetWriteFileTypeToExplicitVR()
    std::string ts = Util::DicomString( 
       Document::GetTransferSyntaxValue(ExplicitVRLittleEndian).c_str() );
 
-   ValEntrytss = CopyValEntry(0x0002,0x0010);
+   ValEntry *tss = CopyValEntry(0x0002,0x0010);
    tss->SetValue(ts);
 
    Archive->Push(tss);
@@ -778,7 +778,7 @@ void File::SetWriteFileTypeToImplicitVR()
    std::string ts = Util::DicomString(
       Document::GetTransferSyntaxValue(ImplicitVRLittleEndian).c_str() );
 
-   ValEntrytss = CopyValEntry(0x0002,0x0010);
+   ValEntry *tss = CopyValEntry(0x0002,0x0010);
    tss->SetValue(ts);
 
    Archive->Push(tss);
@@ -840,10 +840,10 @@ void File::RestoreWriteOfLibido()
    Archive->Restore(0x0008,0x0010);
 }
 
-ValEntryFile::CopyValEntry(uint16_t group,uint16_t element)
+ValEntry *File::CopyValEntry(uint16_t group,uint16_t element)
 {
-   DocEntryoldE = HeaderInternal->GetDocEntryByNumber(group, element);
-   ValEntrynewE;
+   DocEntry *oldE = HeaderInternal->GetDocEntryByNumber(group, element);
+   ValEntry *newE;
 
    if(oldE)
    {
@@ -858,10 +858,10 @@ ValEntry* File::CopyValEntry(uint16_t group,uint16_t element)
    return(newE);
 }
 
-BinEntryFile::CopyBinEntry(uint16_t group,uint16_t element)
+BinEntry *File::CopyBinEntry(uint16_t group,uint16_t element)
 {
-   DocEntryoldE = HeaderInternal->GetDocEntryByNumber(group, element);
-   BinEntrynewE;
+   DocEntry *oldE = HeaderInternal->GetDocEntryByNumber(group, element);
+   BinEntry *newE;
 
    if(oldE)
    {
@@ -896,13 +896,13 @@ void File::Initialise()
    }
 }
 
-uint8_tFile::GetRaw()
+uint8_t *File::GetRaw()
 {
-   uint8_traw = PixelReadConverter->GetRaw();
+   uint8_t *raw = PixelReadConverter->GetRaw();
    if ( ! raw )
    {
       // The Raw image migth not be loaded yet:
-      std::ifstreamfp = HeaderInternal->OpenFile();
+      std::ifstream *fp = HeaderInternal->OpenFile();
       PixelReadConverter->ReadAndDecompressPixelData( fp );
       if(fp) 
          HeaderInternal->CloseFile();
index af9382efac99beb6e325683ae3bc0eb660075105..0f75b016bd9788250b156e917e5e22017b6ff6b2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 08:46:21 $
-  Version:   $Revision: 1.90 $
+  Date:      $Date: 2005/01/06 20:03:27 $
+  Version:   $Revision: 1.91 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -47,27 +47,27 @@ public:
      
 public:
    File( );
-   File( Headerheader );
-   File( std::string constfilename );
+   File( Header *header );
+   File( std::string const &filename );
  
    virtual ~File();
 
    void Print(std::ostream &os = std::cout); 
 
    /// Accessor to \ref Header
-   HeaderGetHeader() { return HeaderInternal; }
+   Header *GetHeader() { return HeaderInternal; }
 
    size_t GetImageDataSize();
    size_t GetImageDataRawSize();
 
-   uint8_tGetImageData();
-   uint8_tGetImageDataRaw();
-   size_t GetImageDataIntoVector(voiddestination, size_t maxSize);
+   uint8_t *GetImageData();
+   uint8_t *GetImageDataRaw();
+   size_t GetImageDataIntoVector(void *destination, size_t maxSize);
 
-   void SetImageData(uint8_tdata, size_t expectedSize);
+   void SetImageData(uint8_t *data, size_t expectedSize);
 
    // User datas
-   void SetUserData(uint8_tdata, size_t expectedSize);
+   void SetUserData(uint8_t *data, size_t expectedSize);
    uint8_t* GetUserData();
    size_t GetUserDataSize();
    // RBG datas (from file
@@ -80,19 +80,19 @@ 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 constfileName);
-   bool WriteDcmImplVR(std::string constfileName);
-   bool WriteDcmExplVR(std::string constfileName);
-   bool WriteAcr      (std::string constfileName);
-   bool Write(std::string const& 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);
+   bool Write         (std::string const &fileName);
 
-   bool SetEntryByNumber(std::string constcontent,
+   bool SetEntryByNumber(std::string const &content,
                          uint16_t group, uint16_t element);
-   bool SetEntryByNumber(uint8_tcontent, int lgth,
+   bool SetEntryByNumber(uint8_t *content, int lgth,
                          uint16_t group, uint16_t element);
-   bool ReplaceOrCreateByNumber(std::string constcontent,
+   bool ReplaceOrCreateByNumber(std::string const &content,
                                 uint16_t group, uint16_t element);
-   bool ReplaceOrCreateByNumber(uint8_tbinArea, int lgth,
+   bool ReplaceOrCreateByNumber(uint8_t *binArea, int lgth,
                                 uint16_t group, uint16_t element);
 
    uint8_t* GetLutRGBA();
@@ -127,13 +127,13 @@ protected:
    void SetWriteToNoLibido();
    void RestoreWriteOfLibido();
 
-   ValEntryCopyValEntry(uint16_t group,uint16_t element);
-   BinEntryCopyBinEntry(uint16_t group,uint16_t element);
+   ValEntry *CopyValEntry(uint16_t group,uint16_t element);
+   BinEntry *CopyBinEntry(uint16_t group,uint16_t element);
 
 private:
    void Initialise();
 
-   uint8_tGetRaw();
+   uint8_t *GetRaw();
 
 // members variables:
    /// Header to use to load the file
@@ -148,8 +148,8 @@ private:
    bool Parsed;
 
    /// Utility pixel converter
-   PixelReadConvertPixelReadConverter;
-   PixelWriteConvertPixelWriteConverter;
+   PixelReadConvert *PixelReadConverter;
+   PixelWriteConvert *PixelWriteConverter;
 
    // Utility header archive
    DocEntryArchive *Archive;
index 2c356eddcd422d44c195a916320044c4f9df3edc..31263819c3b7ea2cace0232fb4eee99965e04bc1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:05:06 $
-  Version:   $Revision: 1.221 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.222 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -34,7 +34,7 @@ namespace gdcm
  * \brief  Constructor 
  * @param  filename name of the file whose header we want to analyze
  */
-Header::Header( std::string const & filename ):
+Header::Header( std::string const &filename ):
             Document( filename )
 {    
    // for some ACR-NEMA images GrPixel, NumPixel is *not* 7fe0,0010
@@ -81,7 +81,7 @@ Header::Header( std::string const & filename ):
    // Let's create a VirtualDictEntry to allow a further VR modification
    // and force VR to match with BitsAllocated.
 
-   DocEntryentry = GetDocEntryByNumber(GrPixel, NumPixel); 
+   DocEntry *entry = GetDocEntryByNumber(GrPixel, NumPixel); 
    if ( entry != 0 )
    {
 
@@ -127,7 +127,7 @@ Header::~Header ()
  */
 bool Header::Write(std::string fileName, FileType filetype)
 {
-   std::ofstreamfp = new std::ofstream(fileName.c_str(), 
+   std::ofstream *fp = new std::ofstream(fileName.c_str(), 
                                          std::ios::out | std::ios::binary);
    if (*fp == NULL)
    {
@@ -163,7 +163,7 @@ bool Header::Write(std::string fileName, FileType filetype)
       // Drop 0028|1101, 0028|1102, 0028|1103
       // Drop 0028|1201, 0028|1202, 0028|1203
 
-      DocEntrye = GetDocEntryByNumber(0x0028,0x01101);
+      DocEntry *e = GetDocEntryByNumber(0x0028,0x01101);
       if (e)
       {
          RemoveEntryNoDestroy(e);
index 4e67476300820cf79b243e68b62452934da050ff..8c56bdd042384a8229ab3c85044aadb161288eea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.96 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.97 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -110,7 +110,7 @@ protected:
 
 public:
    Header();
-   Header( std::string const & filename );
+   Header( std::string const &filename );
  
    ~Header();
 
index ef4d814ec939e506c7457e400b65ccacddccdc1c..07c2fd94c5e158a7869e73e544be8286484348c8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 13:35:38 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,21 +41,21 @@ bool gdcm_read_JPEG2000_file (std::ifstream* fp, void* image_buffer);
 
 #define JOCTET uint8_t
 // For JPEG 8 Bits, body in file gdcmJpeg8.cxx
-bool gdcm_read_JPEG_file8 (std::ifstream* fp, void* image_buffer);
-bool gdcm_read_JPEG_memory8    (const JOCTETbuffer, const size_t buflen, 
-                                voidimage_buffer,
+bool gdcm_read_JPEG_file8 (std::ifstream *fp, void *image_buffer);
+bool gdcm_read_JPEG_memory8    (const JOCTET *buffer, const size_t buflen, 
+                                void *image_buffer,
                                 size_t *howManyRead, size_t *howManyWritten);
 //
 // For JPEG 12 Bits, body in file gdcmJpeg12.cxx
-bool gdcm_read_JPEG_file12 (std::ifstream* fp, void* image_buffer);
+bool gdcm_read_JPEG_file12 (std::ifstream *fp, void *image_buffer);
 bool gdcm_read_JPEG_memory12   (const JOCTET *buffer, const size_t buflen, 
-                                voidimage_buffer,
+                                void *image_buffer,
                                 size_t *howManyRead, size_t *howManyWritten);
 
 // For JPEG 16 Bits, body in file gdcmJpeg16.cxx
 // Beware this is misleading there is no 16bits DCT algorithm, only
 // jpeg lossless compression exist in 16bits.
-bool gdcm_read_JPEG_file16 (std::ifstream* fp, void* image_buffer);
+bool gdcm_read_JPEG_file16 (std::ifstream *fp, void *image_buffer);
 bool gdcm_read_JPEG_memory16   (const JOCTET *buffer, const size_t buflen, 
                                 void* image_buffer,
                                 size_t *howManyRead, size_t *howManyWritten);
@@ -121,7 +121,7 @@ void PixelReadConvert::AllocateRaw()
  * \brief Read from file a 12 bits per pixel image and decompress it
  *        into a 16 bits per pixel image.
  */
-void PixelReadConvert::ReadAndDecompress12BitsTo16Bits( std::ifstreamfp )
+void PixelReadConvert::ReadAndDecompress12BitsTo16Bits( std::ifstream *fp )
                throw ( FormatError )
 {
    int nbPixels = XSize * YSize;
@@ -216,10 +216,10 @@ bool PixelReadConvert::DecompressRLE16BitsFromRLE8Bits( int NumberOfFrames )
  * @param fp File Pointer: on entry the position should be the one of
  *        the fragment to be decoded.
  */
-bool PixelReadConvert::ReadAndDecompressRLEFragment( uint8_tsubRaw,
+bool PixelReadConvert::ReadAndDecompressRLEFragment( uint8_t *subRaw,
                                                  long fragmentSize,
                                                  long RawSegmentSize,
-                                                 std::ifstreamfp )
+                                                 std::ifstream *fp )
 {
    int8_t count;
    long numberOfOutputBytes = 0;
@@ -274,9 +274,9 @@ bool PixelReadConvert::ReadAndDecompressRLEFragment( uint8_t* subRaw,
  *            at which the pixel data should be copied
  * @return    Boolean
  */
-bool PixelReadConvert::ReadAndDecompressRLEFile( std::ifstreamfp )
+bool PixelReadConvert::ReadAndDecompressRLEFile( std::ifstream *fp )
 {
-   uint8_tsubRaw = Raw;
+   uint8_t *subRaw = Raw;
    long RawSegmentSize = XSize * YSize;
 
    // Loop on the frame[s]
@@ -315,7 +315,7 @@ void PixelReadConvert::ConvertSwapZone()
 
    if( BitsAllocated == 16 )
    {
-      uint16_tim16 = (uint16_t*)Raw;
+      uint16_t *im16 = (uint16_t*)Raw;
       switch( SwapCode )
       {
          case 0:
@@ -421,9 +421,9 @@ void PixelReadConvert::ConvertReorderEndianity()
  * @param     fp File Pointer
  * @return    Boolean
  */
-bool PixelReadConvert::ReadAndDecompressJPEGFramesFromFile( std::ifstreamfp )
+bool PixelReadConvert::ReadAndDecompressJPEGFramesFromFile( std::ifstream *fp )
 {
-   uint8_tlocalRaw = Raw;
+   uint8_t *localRaw = Raw;
    // Loop on the fragment[s]
    for( JPEGFragmentsInfo::JPEGFragmentsList::iterator
         it  = JPEGInfo->Fragments.begin();
@@ -485,7 +485,7 @@ bool PixelReadConvert::ReadAndDecompressJPEGFramesFromFile( std::ifstream* fp )
  * @return    Boolean
  */
 bool PixelReadConvert::
-ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstreamfp )
+ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstream *fp )
 {
    // Loop on the fragment[s] to get total length
    size_t totalLength = 0;
@@ -577,7 +577,7 @@ ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstream* fp )
  * @return    Boolean
  */
 bool PixelReadConvert::
-ReadAndDecompressJPEGFragmentedFramesFromFile( std::ifstreamfp )
+ReadAndDecompressJPEGFragmentedFramesFromFile( std::ifstream *fp )
 {
    // Loop on the fragment[s] to get total length
    size_t totalLength = 0;
@@ -676,7 +676,7 @@ ReadAndDecompressJPEGFragmentedFramesFromFile( std::ifstream* fp )
  * @param     fp File Pointer
  * @return    Boolean
  */
-bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstreamfp )
+bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstream *fp )
 {
    if ( IsJPEG2000 )
    {
@@ -752,8 +752,8 @@ bool PixelReadConvert::ConvertReArrangeBits() throw ( FormatError )
  */
 void PixelReadConvert::ConvertYcBcRPlanesToRGBPixels()
 {
-   uint8_tlocalRaw = Raw;
-   uint8_tcopyRaw = new uint8_t[ RawSize ];
+   uint8_t *localRaw = Raw;
+   uint8_t *copyRaw = new uint8_t[ RawSize ];
    memmove( copyRaw, localRaw, RawSize );
 
    // to see the tricks about YBR_FULL, YBR_FULL_422,
@@ -764,9 +764,9 @@ void PixelReadConvert::ConvertYcBcRPlanesToRGBPixels()
    int l        = XSize * YSize;
    int nbFrames = ZSize;
 
-   uint8_ta = copyRaw;
-   uint8_tb = copyRaw + l;
-   uint8_tc = copyRaw + l + l;
+   uint8_t *a = copyRaw;
+   uint8_t *b = copyRaw + l;
+   uint8_t *c = copyRaw + l + l;
    double R, G, B;
 
    /// \todo : Replace by the 'well known' integer computation
@@ -806,8 +806,8 @@ void PixelReadConvert::ConvertYcBcRPlanesToRGBPixels()
  */
 void PixelReadConvert::ConvertRGBPlanesToRGBPixels()
 {
-   uint8_tlocalRaw = Raw;
-   uint8_tcopyRaw = new uint8_t[ RawSize ];
+   uint8_t *localRaw = Raw;
+   uint8_t *copyRaw = new uint8_t[ RawSize ];
    memmove( copyRaw, localRaw, RawSize );
 
    int l = XSize * YSize * ZSize;
@@ -825,7 +825,7 @@ void PixelReadConvert::ConvertRGBPlanesToRGBPixels()
    delete[] copyRaw;
 }
 
-bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstreamfp )
+bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp )
 {
    // ComputeRawAndRGBSizes is already made by 
    // ::GrabInformationsFromHeader. So, the structure sizes are
@@ -1022,7 +1022,7 @@ void PixelReadConvert::ComputeRawAndRGBSizes()
    }
 }
 
-void PixelReadConvert::GrabInformationsFromHeader( Headerheader )
+void PixelReadConvert::GrabInformationsFromHeader( Header *header )
 {
    // Number of Bits Allocated for storing a Pixel is defaulted to 16
    // when absent from the header.
index 79d882a6564efda1c023be5782ed409eece8c69a..4c0b5846c6ffd4f83b317a1aad64568b523e8078 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:07:34 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,27 +53,27 @@ public:
    void Print( std::string indent = "", std::ostream &os = std::cout );
 
 // In progress
-   void GrabInformationsFromHeader( Headerheader );
-   bool ReadAndDecompressPixelData( std::ifstreamfp );
+   void GrabInformationsFromHeader( Header *header );
+   bool ReadAndDecompressPixelData( std::ifstream *fp );
    void Squeeze();
    bool BuildRGBImage();
 
 private:
    // Use the fp:
    bool ReadAndDecompressRLEFragment(
-                  uint8_tsubDecompressed,
+                  uint8_t *subDecompressed,
                   long fragmentSize,
                   long decompressedSegmentSize,
-                  std::ifstreamfp );
-   void ReadAndDecompress12BitsTo16Bits( std::ifstreamfp ) throw ( FormatError );
-   bool ReadAndDecompressRLEFile( std::ifstreamfp );
-   bool ReadAndDecompressJPEGFile( std::ifstreamfp );
-   bool ReadAndDecompressJPEGFramesFromFile( std::ifstreamfp );
-   bool ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstreamfp );
-   bool ReadAndDecompressJPEGFragmentedFramesFromFile( std::ifstreamfp );
+                  std::ifstream *fp );
+   void ReadAndDecompress12BitsTo16Bits( std::ifstream *fp ) throw ( FormatError );
+   bool ReadAndDecompressRLEFile( std::ifstream *fp );
+   bool ReadAndDecompressJPEGFile( std::ifstream *fp );
+   bool ReadAndDecompressJPEGFramesFromFile( std::ifstream *fp );
+   bool ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstream *fp );
+   bool ReadAndDecompressJPEGFragmentedFramesFromFile( std::ifstream *fp );
 
 
-   void BuildLUTRGBA( std::ifstreamfp );
+   void BuildLUTRGBA( std::ifstream *fp );
 
    // In place (within Decompressed and with no fp access) decompression
    // or convertion:
@@ -92,16 +92,16 @@ private:
 
 // Variables
    /// Pixel data represented as RGB after LUT color interpretation.
-   uint8_tRGB;
+   uint8_t *RGB;
    /// Size of RGB image.
    size_t   RGBSize;
    /// Pixel data after decompression and bit/byte rearrangement.
-   uint8_tRaw;
+   uint8_t *Raw;
    /// Size of Decompressed image.
    size_t   RawSize;
    /// \brief Red/Green/Blue/Alpha LookUpTable build out of the
    ///        Red/Green/Blue LUT descriptors (see \ref BuildLUTRGBA ).
-   uint8_tLutRGBA;
+   uint8_t *LutRGBA;
 
    size_t PixelOffset;
    size_t PixelDataLength;
@@ -121,8 +121,8 @@ private:
    bool IsJPEGLossless;
    bool IsRLELossless;
 
-   RLEFramesInfoRLEInfo;
-   JPEGFragmentsInfoJPEGInfo;
+   RLEFramesInfo *RLEInfo;
+   JPEGFragmentsInfo *JPEGInfo;
 
    // For handling color stage
    int PlanarConfiguration;
@@ -134,9 +134,9 @@ private:
    std::string LutRedDescriptor;
    std::string LutGreenDescriptor;
    std::string LutBlueDescriptor;
-   uint8_tLutRedData;
-   uint8_tLutGreenData;
-   uint8_tLutBlueData;
+   uint8_t *LutRedData;
+   uint8_t *LutGreenData;
+   uint8_t *LutBlueData;
 
 };
 } // end namespace gdcm
index d0f9e243331add60f46025d686b08c4db44414af..8e74c339ba2afb3820bee0a506a4522848c2bb2c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelWriteConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 09:32:24 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -45,19 +45,19 @@ PixelWriteConvert::~PixelWriteConvert()
 
 //-----------------------------------------------------------------------------
 // Public
-void PixelWriteConvert::SetReadData(uint8_tdata,size_t size)
+void PixelWriteConvert::SetReadData(uint8_t *data,size_t size)
 {
    ReadData = data;
    ReadDataSize = size;
 }
 
-void PixelWriteConvert::SetUserData(uint8_tdata,size_t size)
+void PixelWriteConvert::SetUserData(uint8_t *data,size_t size)
 {
    UserData = data;
    UserDataSize = size;
 }
 
-uint8_tPixelWriteConvert::GetData()
+uint8_t *PixelWriteConvert::GetData()
 {
    if(UserData)
    {
index 597966f1996321b259a72101abdeb86ce0984c54..4f3b5b39a1820e0c6938c7c67ae4b0f87ee403b9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelWriteConvert.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 16:07:34 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -36,27 +36,27 @@ public:
    virtual ~PixelWriteConvert();
 
    // Set/Get of images and their size
-   void SetReadData(uint8_tdata,size_t size);
-   uint8_tGetReadData() { return ReadData; }
+   void SetReadData(uint8_t *data,size_t size);
+   uint8_t *GetReadData() { return ReadData; }
    size_t   GetReadDataSize() { return ReadDataSize; }
 
-   void SetUserData(uint8_tdata,size_t size);
-   uint8_tGetUserData() { return UserData; }
+   void SetUserData(uint8_t *data,size_t size);
+   uint8_t *GetUserData() { return UserData; }
    size_t   GetUserDataSize() { return UserDataSize; }
 
    // Get the used image and its size
-   uint8_tGetData();
+   uint8_t *GetData();
    size_t   GetDataSize();
 
 private:
 // Variables
    /// Pixel data represented as RGB after LUT color interpretation.
-   uint8_tReadData;
+   uint8_t *ReadData;
    /// Size of RGB image.
    size_t   ReadDataSize;
 
    /// User pixel data
-   uint8_tUserData;
+   uint8_t *UserData;
    /// Size of User image.
    size_t   UserDataSize;
 };
index c2481956493c5d8000a7e1f35f85c8261fa23811..9babd77f5ff34fde840ed5b022c0606722036fa7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/05 15:38:28 $
-  Version:   $Revision: 1.44 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -60,7 +60,7 @@ SQItem::~SQItem()
 /*
  * \brief   canonical Printer
  */
-void SQItem::Print(std::ostreamos)
+void SQItem::Print(std::ostream &os)
 {
    std::ostringstream s;
 
@@ -76,13 +76,13 @@ void SQItem::Print(std::ostream& os)
                                i != DocEntries.end();
                              ++i)
    {
-      DocEntryEntry = *i;
+      DocEntry *Entry = *i;
       bool PrintEndLine = true;
 
       os << s.str();
       Entry->SetPrintLevel(PrintLevel);
       Entry->Print(os); 
-      if ( SeqEntryseqEntry = dynamic_cast<SeqEntry*>(Entry) )
+      if ( SeqEntry *seqEntry = dynamic_cast<SeqEntry*>(Entry) )
       {
          (void)seqEntry;  //not used
          PrintEndLine = false;
@@ -98,7 +98,7 @@ void SQItem::Print(std::ostream& os)
  * \ingroup SQItem
  * \brief   canonical Writer
  */
-void SQItem::WriteContent(std::ofstreamfp, FileType filetype)
+void SQItem::WriteContent(std::ofstream *fp, FileType filetype)
 {
    int j;
    uint16_t item[4] = { 0xfffe, 0xe000, 0xffff, 0xffff };
@@ -147,7 +147,7 @@ void SQItem::WriteContent(std::ofstream* fp, FileType filetype)
 /**
  * \brief   adds any Entry (Dicom Element) to the Sequence Item
  */
-bool SQItem::AddEntry(DocEntryentry)
+bool SQItem::AddEntry(DocEntry *entry)
 {
    DocEntries.push_back(entry);
    //TODO : check if it worked
@@ -167,7 +167,7 @@ bool SQItem::AddEntry(DocEntry* entry)
  * @return  true if element was found or created successfully
  */
 
-bool SQItem::SetEntryByNumber(std::string const & val, uint16_t group, 
+bool SQItem::SetEntryByNumber(std::string const &val, uint16_t group, 
                               uint16_t element)
 {
    for(ListDocEntry::iterator i = DocEntries.begin(); 
index f519d7af00ea7fe33199460594c77fefd0913846..9bce85dd5311b1f27bbdf4395d5d5a5de6e350fc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:03 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.28 $
                                                                                 
   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 @@ public:
    void WriteContent(std::ofstream *fp, FileType filetype);
 
    /// \brief   returns the DocEntry chained List for this SQ Item.
-   ListDocEntry const & GetDocEntries() const { return DocEntries; };
+   ListDocEntry const &GetDocEntries() const { return DocEntries; };
    
    /// \brief   adds the passed DocEntry to the DocEntry chained List for
    /// this SQ Item.      
@@ -51,10 +51,10 @@ public:
   
    DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
    // FIXME method to write
-   //DocEntry *GetDocEntryByName  (std::string Name);
+   //DocEntry *GetDocEntryByName(std::string Name);
    
-   bool SetEntryByNumber(std::string const & val, uint16_t group, 
-                                                  uint16_t element);
+   bool SetEntryByNumber(std::string const &val, uint16_t group, 
+                                                 uint16_t element);
     
    std::string GetEntryByNumber(uint16_t group, uint16_t element);
 
@@ -71,10 +71,10 @@ public:
    void SetDepthLevel(int depth) { SQDepthLevel = depth; }
 
    /// Accessor on \ref BaseTagKey.
-   void SetBaseTagKey( BaseTagKey const & key ) { BaseTagKeyNested = key; }
+   void SetBaseTagKey( BaseTagKey const &key ) { BaseTagKeyNested = key; }
 
    /// Accessor on \ref BaseTagKey.
-   BaseTagKey const & GetBaseTagKey() const { return BaseTagKeyNested; }
+   BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
 
    void Initialize();
    DocEntry *GetNextEntry();
index 25a2c2679d5d36d39e1a81717ca90ed3c05ce141..1962d89fbf0244bde1f7683aba3580c369de4400 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:37 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.41 $
                                                                                 
   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
  * \ingroup SeqEntry
  * \brief   Constructor from a given SeqEntry
  */
-SeqEntry::SeqEntry( DictEntrye ) 
+SeqEntry::SeqEntry( DictEntry *e ) 
              : DocEntry(e)
 {
    UsableLength = 0;
@@ -51,7 +51,7 @@ SeqEntry::SeqEntry( DictEntry* e )
  * @param   e Pointer to existing Doc entry
  * @param   depth depth level of the current Seq entry
   */
-SeqEntry::SeqEntry( DocEntrye, int depth )
+SeqEntry::SeqEntry( DocEntry *e, int depth )
              : DocEntry( e->GetDictEntry() )
 {
    UsableLength = 0;
@@ -122,7 +122,7 @@ void SeqEntry::Print( std::ostream &os )
 /*
  * \brief   canonical Writer
  */
-void SeqEntry::WriteContent(std::ofstreamfp, FileType filetype)
+void SeqEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    uint16_t seq_term_gr = 0xfffe;
    uint16_t seq_term_el = 0xe0dd;
@@ -162,7 +162,7 @@ void SeqEntry::AddEntry(SQItem *sqItem, int itemNumber)
  *        Returns the last item when argument is bigget than the total
  *        item number.
  */
-SQItemSeqEntry::GetSQItemByOrdinalNumber(int nb)
+SQItem *SeqEntry::GetSQItemByOrdinalNumber(int nb)
 {
    if (nb<0)
    {
index 4f22ff2f4177b5e420648b3c09f6f9125d189ae9..2388523fd09f188daff69fe942fc2c6246152468 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -33,21 +33,21 @@ typedef std::list<SQItem *> ListSQItem;
 class GDCM_EXPORT SeqEntry : public DocEntry 
 {
 public:
-   SeqEntry( DictEntry);
-   SeqEntry( DocEntryd, int depth );
+   SeqEntry( DictEntry *e);
+   SeqEntry( DocEntry *d, int depth );
    ~SeqEntry();
    
    void Print(std::ostream &os = std::cout); 
    void WriteContent(std::ofstream *fp, FileType filetype);
 
    /// returns the SQITEM chained List for this SeQuence.
-   ListSQItem const & GetSQItems() const { return Items; }
+   ListSQItem const &GetSQItems() const { return Items; }
       
    /// Sets the delimitor mode
    void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
 
    /// Sets the Sequence Delimitation Item
-   void SetSequenceDelimitationItem(DocEntry * e) { SeqTerm = e;}
+   void SetSequenceDelimitationItem(DocEntry *e) { SeqTerm = e;}
 
    void AddEntry(SQItem *it, int itemNumber);
    SQItem *GetSQItemByOrdinalNumber(int itemNumber);
index ff773d8b3bab92d1e88f816bdd69f9393b7a692b..51198d24f87c790392252994c6263d456dd2e859 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -55,7 +55,7 @@ SerieHeader::~SerieHeader()
  * \brief add a File to the list based on file name
  * @param   filename Name of the file to deal with
  */
-void SerieHeader::AddFileName(std::string const & filename)
+void SerieHeader::AddFileName(std::string const &filename)
 {
    Header *header = new Header( filename );
    CoherentGdcmFileList.push_back( header );
@@ -74,7 +74,7 @@ void SerieHeader::AddGdcmFile(Header *file)
  * \brief Sets the Directory
  * @param   dir Name of the directory to deal with
  */
-void SerieHeader::SetDirectory(std::string const & dir)
+void SerieHeader::SetDirectory(std::string const &dir)
 {
    DirList filenames_list(dir);  //OS specific
   
index fe95a31bb8876393f53caf8de9ddd91af0f235b1..1a94d7cd49c545790d19cad702e0cb9014677ac0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -40,20 +40,20 @@ public:
     ~SerieHeader();
 
    /// \todo should return bool or throw error ?
-   void AddFileName(std::string const & filename);
+   void AddFileName(std::string const &filename);
    void AddGdcmFile(Header *file);
-   void SetDirectory(std::string const & dir);
+   void SetDirectory(std::string const &dir);
    void OrderGdcmFileList();
    
    /// \warning Assumes all elements in the list have the same global infos.
    ///          Assumes the list is not empty.
-   HeaderGetGdcmHeader() { return CoherentGdcmFileList.front(); }
+   Header *GetGdcmHeader() { return CoherentGdcmFileList.front(); }
 
    typedef std::list<Header* > GdcmHeaderList;
 
    /// \brief Gets the *coherent* File List
    /// @return the *coherent* File List
-   const GdcmHeaderListGetGdcmFileList() { return CoherentGdcmFileList; }
+   const GdcmHeaderList &GetGdcmFileList() { return CoherentGdcmFileList; }
 
 private:
    bool ImagePositionPatientOrdering();
index d489f6f1753041edb12d05726465cb0c6f915035..4d335126a6e9f3bcdc1285e92ade05b8a56b2e52 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 15:41:28 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -33,7 +33,7 @@
 
 namespace gdcm 
 {
-void FillDefaultTSDict(TSHT & ts);
+void FillDefaultTSDict(TSHT &ts);
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 TS::TS() 
@@ -91,12 +91,12 @@ void TS::Print(std::ostream &os)
 
 //-----------------------------------------------------------------------------
 // Public
-int TS::Count(TSKey const & key) 
+int TS::Count(TSKey const &key) 
 {
    return TsMap.count(key);
 }
 
-TSAtr const & TS::GetValue(TSKey const & key) 
+TSAtr const & TS::GetValue(TSKey const &key) 
 {
    TSHT::const_iterator it = TsMap.find(key);
    if (it == TsMap.end())
index 76ecc90a1d19e77c9199bf2614a28b8a1a85197a..94336b510a4878e98d2a97d6fb5915190949cabe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -45,8 +45,8 @@ public:
 
    void Print(std::ostream &os = std::cout);
 
-   int Count(TSKey const & key);
-   TSAtr const & GetValue(TSKey const & key);
+   int Count(TSKey const &key);
+   TSAtr const &GetValue(TSKey const &key);
 
 private:
    TSHT TsMap;
index ad20827e6542ef94053bd6fac7202fe5e30581a8..bf583caf1eed3c51ddfbf213f4f80d6ca618a7c4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 19:39:24 $
-  Version:   $Revision: 1.76 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -53,7 +53,7 @@ namespace gdcm
  * buf.str();
  */
 
-std::string Util::Format(const charformat, ...)
+std::string Util::Format(const char *format, ...)
 {
    char buffer[2048];
    va_list args;
@@ -70,8 +70,8 @@ std::string Util::Format(const char* format, ...)
  * \ingroup Globals
  * \brief Because not available in C++ (?)
  */
-void Util::Tokenize (const std::stringstr,
-                     std::vector<std::string>tokens,
+void Util::Tokenize (const std::string &str,
+                     std::vector<std::string> &tokens,
                      const std::string& delimiters)
 {
    std::string::size_type lastPos = str.find_first_not_of(delimiters,0);
@@ -90,8 +90,8 @@ void Util::Tokenize (const std::string& str,
  *        Counts the number of occurences of a substring within a string
  */
  
-int Util::CountSubstring (const std::stringstr,
-                          const std::stringsubStr)
+int Util::CountSubstring (const std::string &str,
+                          const std::string &subStr)
 {
    int count = 0;   // counts how many times it appears
    std::string::size_type x = 0;       // The index position in the string
@@ -116,7 +116,7 @@ int Util::CountSubstring (const std::string& str,
  *         to avoid corrupting the terminal of invocation when printing)
  * @param s string to remove non printable characters from
  */
-std::string Util::CreateCleanString(std::string const & s)
+std::string Util::CreateCleanString(std::string const &s)
 {
    std::string str = s;
 
@@ -147,7 +147,7 @@ std::string Util::CreateCleanString(std::string const & s)
  * \brief   Add a SEPARATOR to the end of the name is necessary
  * @param   pathname file/directory name to normalize 
  */
-std::string Util::NormalizePath(std::string const & pathname)
+std::string Util::NormalizePath(std::string const &pathname)
 {
    const char SEPARATOR_X      = '/';
    const char SEPARATOR_WIN    = '\\';
@@ -167,7 +167,7 @@ std::string Util::NormalizePath(std::string const & pathname)
  * \brief   Get the (directory) path from a full path file name
  * @param   fullName file/directory name to extract Path from
  */
-std::string Util::GetPath(std::string const & fullName)
+std::string Util::GetPath(std::string const &fullName)
 {
    std::string res = fullName;
    int pos1 = res.rfind("/");
@@ -189,7 +189,7 @@ std::string Util::GetPath(std::string const & fullName)
  * \brief   Get the (last) name of a full path file name
  * @param   fullName file/directory name to extract end name from
  */
-std::string Util::GetName(std::string const & fullName)
+std::string Util::GetName(std::string const &fullName)
 {   
   std::string filename = fullName;
 
@@ -240,7 +240,7 @@ std::string Util::GetCurrentTime()
  * that needed to be escaped with an extra backslash for doxygen) \\0
  * as you want.
  */
-std::string Util::DicomString(const chars, size_t l)
+std::string Util::DicomString(const char *s, size_t l)
 {
    std::string r(s, s+l);
    assert( !(r.size() % 2) ); // == basically 'l' is even
@@ -259,7 +259,7 @@ std::string Util::DicomString(const char* s, size_t l)
  * except it doesn't take a lenght. 
  * It only pad with a null character if length is odd
  */
-std::string Util::DicomString(const chars)
+std::string Util::DicomString(const char *s)
 {
    size_t l = strlen(s);
    if( l%2 )
@@ -278,7 +278,7 @@ std::string Util::DicomString(const char* s)
  *        - We allow padding of even lenght string by either a null 
  *          character of a space
  */
-bool Util::DicomStringEqual(const std::strings1, const char *s2)
+bool Util::DicomStringEqual(const std::string &s1, const char *s2)
 {
   // s2 is the string from the DICOM reference: 'MONOCHROME1'
   std::string s1_even = s1; //Never change input parameter
@@ -702,7 +702,7 @@ std::string Util::GetIPAddress()
   if( r == 0 )
   {
     // Get host adresses
-    struct hostent * pHost = gethostbyname(szHostName);
+    struct hostent *pHost = gethostbyname(szHostName);
 
     for( int i = 0; pHost!= NULL && pHost->h_addr_list[i]!= NULL; i++ )
     {
@@ -732,7 +732,7 @@ std::string Util::GetIPAddress()
  *        each time a DICOM image is create it should have 
  *        a unique identifier (URI)
  */
-std::string Util::CreateUniqueUID(const std::stringroot)
+std::string Util::CreateUniqueUID(const std::string &root)
 {
   // The code works as follow:
   // echo "gdcm" | od -b
@@ -758,12 +758,12 @@ std::string Util::CreateUniqueUID(const std::string& root)
 }
 
 template <class T>
-std::ostream& binary_write(std::ostream& os, const T& val)
+std::ostream &binary_write(std::ostream &os, const T &val)
 {
     return os.write(reinterpret_cast<const char*>(&val), sizeof val);
 }
 
-std::ostream& binary_write(std::ostream& os, const uint16_t& val)
+std::ostream &binary_write(std::ostream &os, const uint16_t &val)
 {
 #ifdef GDCM_WORDS_BIGENDIAN
     uint16_t swap;
@@ -774,7 +774,7 @@ std::ostream& binary_write(std::ostream& os, const uint16_t& val)
 #endif //GDCM_WORDS_BIGENDIAN
 }
 
-std::ostream& binary_write(std::ostream& os, const uint32_t& val)
+std::ostream &binary_write(std::ostream &os, const uint32_t &val)
 {
 #ifdef GDCM_WORDS_BIGENDIAN
     uint32_t swap;
@@ -786,12 +786,12 @@ std::ostream& binary_write(std::ostream& os, const uint32_t& val)
 #endif //GDCM_WORDS_BIGENDIAN
 }
 
-std::ostream& binary_write(std::ostream& os, const char* val)
+std::ostream &binary_write(std::ostream &os, const char *val)
 {
     return os.write(val, strlen(val));
 }
 
-std::ostream& binary_write(std::ostream& os, std::string const & val)
+std::ostream &binary_write(std::ostream &os, std::string const &val)
 {
     return os.write(val.c_str(), val.size());
 }
index 4d44df6023d42bd5ba3b0b1c6cfa114778c44a19..e4490b624db2866613ed47541471fb8629abd30a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 19:10:07 $
-  Version:   $Revision: 1.47 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.48 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -37,24 +37,24 @@ namespace gdcm
 class GDCM_EXPORT Util
 {
 public:
-   static std::string Format(const charformat, ...);
-   static void        Tokenize (const std::stringstr,
-                                std::vector<std::string>tokens,
-                                const std::stringdelimiters = " ");
-   static int         CountSubstring (const std::stringstr,
-                                      const std::stringsubStr);       
+   static std::string Format(const char *format, ...);
+   static void        Tokenize (const std::string &str,
+                                std::vector<std::string> &tokens,
+                                const std::string &delimiters = " ");
+   static int         CountSubstring (const std::string &str,
+                                      const std::string &subStr);       
 
-   static std::string CreateCleanString(std::string const & s);
-   static std::string NormalizePath(std::string const & name);
+   static std::string CreateCleanString(std::string const &s);
+   static std::string NormalizePath(std::string const &name);
    static std::string GetPath(std::string const &fullName);
    static std::string GetName(std::string const &fullName);
    static std::string GetCurrentDate();
    static std::string GetCurrentTime();
 
-   static std::string DicomString(const chars, size_t l);
-   static std::string DicomString(const chars);
-   static bool        DicomStringEqual(const std::strings1, const char *s2);
-   static std::string CreateUniqueUID(const std::stringroot = "");
+   static std::string DicomString(const char *s, size_t l);
+   static std::string DicomString(const char *s);
+   static bool        DicomStringEqual(const std::string &s1, const char *s2);
+   static std::string CreateUniqueUID(const std::string &root = "");
    static bool        IsCurrentProcessorBigEndian();
 
    static std::string GetMACAddress();
@@ -64,11 +64,11 @@ private:
 };
 
    template <class T> 
-   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const T& val);
-   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const uint16_t& val);
-   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const uint32_t& val);
-   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const char* val);
-   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, std::string const & val);
+   GDCM_EXPORT std::ostream &binary_write(std::ostream &os, const T &val);
+   GDCM_EXPORT std::ostream &binary_write(std::ostream &os, const uint16_t &val);
+   GDCM_EXPORT std::ostream &binary_write(std::ostream &os, const uint32_t &val);
+   GDCM_EXPORT std::ostream &binary_write(std::ostream &os, const char *val);
+   GDCM_EXPORT std::ostream &binary_write(std::ostream &os, std::string const & val);
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
 #endif
index 9e032195edf3e710df590b6657e40b5c61156ae7..8a716da72856592bee508010148f884297ae8e92 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:16:16 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  Version:   $Revision: 1.27 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,7 +26,7 @@
 
 namespace gdcm 
 {
-void FillDefaultVRDict(VRHT & vr);
+void FillDefaultVRDict(VRHT &vr);
 //-----------------------------------------------------------------------------
 /**
  * \brief Constructor
@@ -99,7 +99,7 @@ void VR::Print(std::ostream &os)
  * \brief   Get the count for an element
  * @param   key key to count
  */
-int VR::Count(VRKey const & key) 
+int VR::Count(VRKey const &key) 
 {
    return vr.count(key);
 }
@@ -108,11 +108,9 @@ int VR::Count(VRKey const & key)
 /**
  * \brief   Simple predicate that checks wether the given argument
  *          corresponds to the Value Representation of a \ref BinEntry .
- *          This predicate is the negation of
- *          \ref VR::IsVROfGdcmStringRepresentable .
  * @param   tested value representation to check for.
  */
-bool VR::IsVROfBinaryRepresentable(VRKey const & tested)
+bool VR::IsVROfBinaryRepresentable(VRKey const &tested)
 {
    //std::cout << "VR::IsVROfGdcmBinaryRepresentable===================="
    //   << tested << std::endl;
@@ -135,7 +133,7 @@ bool VR::IsVROfBinaryRepresentable(VRKey const & tested)
  *          but NOT a \ref BinEntry.
  * @param   tested value representation to check for.
  */
-bool VR::IsVROfStringRepresentable(VRKey const & tested)
+bool VR::IsVROfStringRepresentable(VRKey const &tested)
 {
    return tested == "AE" ||
           tested == "AS" ||
@@ -162,12 +160,12 @@ bool VR::IsVROfStringRepresentable(VRKey const & tested)
  *          corresponds to the Value Representation of a \ref SeqEntry
  * @param   tested value representation to check for.
  */
-bool VR::IsVROfSequence(VRKey const & tested)
+bool VR::IsVROfSequence(VRKey const &tested)
 {
    return tested == "SQ";
 }
 
-bool VR::IsValidVR(VRKey const & key)
+bool VR::IsValidVR(VRKey const &key)
 {
    return(vr.find(key)!=vr.end());
 }
index 0c658b643e60a247d64ed8f5da1c87f80bdb888e..8071f48e4a351c29bceee970a08488ab122bdbd7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmVR.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 17:16:16 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -45,12 +45,13 @@ public:
    ~VR();
 
    void Print(std::ostream &os = std::cout);
-   int Count(VRKey const & key);
-   bool IsVROfBinaryRepresentable(VRKey const & tested);
-   bool IsVROfStringRepresentable(VRKey const & tested);
-   bool IsVROfSequence(VRKey const & tested);
 
-   bool IsValidVR(VRKey const & key);
+   int Count(VRKey const &key);
+   bool IsVROfBinaryRepresentable(VRKey const &tested);
+   bool IsVROfStringRepresentable(VRKey const &tested);
+   bool IsVROfSequence(VRKey const &tested);
+
+   bool IsValidVR(VRKey const &key);
 
 private:
    VRHT vr;
index 6c10af843efc49b02aa7abf87c35f407a9df0b8e..6b81bad9ba9346e0e75a2011fb86dea211c53b93 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 13:46:38 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -36,7 +36,7 @@ namespace gdcm
  * \brief   Constructor from a given DictEntry
  * @param   e Pointer to existing dictionary entry
  */
-ValEntry::ValEntry(DictEntrye) : DocEntry(e)
+ValEntry::ValEntry(DictEntry *e) : DocEntry(e)
 {
 }
 
@@ -44,7 +44,7 @@ ValEntry::ValEntry(DictEntry* e) : DocEntry(e)
  * \brief   Constructor from a given DocEntry
  * @param   e Pointer to existing Doc entry
  */
-ValEntry::ValEntry(DocEntrye)
+ValEntry::ValEntry(DocEntry *e)
              : DocEntry(e->GetDictEntry())
 {
    UsableLength = e->GetLength();
@@ -66,7 +66,7 @@ ValEntry::~ValEntry ()
 /**
  * \brief   canonical Printer
  */
-void ValEntry::Print(std::ostream & os)
+void ValEntry::Print(std::ostream &os)
 {
    uint16_t g = GetGroup();
    uint16_t e = GetElement();
@@ -176,7 +176,7 @@ void ValEntry::Print(std::ostream & os)
 
 //-----------------------------------------------------------------------------
 // Public
-void ValEntry::SetValue(std::string const & val)
+void ValEntry::SetValue(std::string const &val)
 {
    // Integers have a special treatement for their length:
    int l = val.length();
@@ -219,7 +219,7 @@ void ValEntry::SetValue(std::string const & val)
 /*
  * \brief   canonical Writer
  */
-void ValEntry::WriteContent(std::ofstreamfp, FileType filetype)
+void ValEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    DocEntry::WriteContent(fp, filetype);
 
index d83a18c18b38575d4557df73dc213117bfc3fa68..fa2aec8fb1cd4a071a43133433985ba7aec7e295 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 13:39:33 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2005/01/06 20:03:28 $
+  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
@@ -34,18 +34,18 @@ namespace gdcm
 class GDCM_EXPORT ValEntry  : public DocEntry
 {
 public:
-   ValEntry(DictEntrye);
-   ValEntry(DocEntryd); 
+   ValEntry(DictEntry *e);
+   ValEntry(DocEntry *d); 
    ~ValEntry();
 
    /// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
    /// 'string', event if it's stored as an integer in the header of the
    /// current Dicom Document Entry
-   std::string const & GetValue() const { return Value; };
+   std::string const &GetValue() const { return Value; };
     
    /// Sets the value (string) of the current Dicom Document Entry.
    /// The size is updated
-   virtual void SetValue(std::string const & val);
+   virtual void SetValue(std::string const &val);
 
    virtual void Print(std::ostream &os = std::cout); 
 
@@ -53,7 +53,7 @@ public:
 
 protected:
    /// Sets the value (string) of the current Dicom Document Entry
-   void SetValueOnly(std::string const & val) { Value = val; }; 
+   void SetValueOnly(std::string const &val) { Value = val; }; 
    
 private:
 // Members :