]> Creatis software - gdcm.git/commitdiff
STYLE: ivars should start with a capital letter. Accessors should be const to avoid...
authormalaterre <malaterre>
Mon, 25 Oct 2004 04:08:19 +0000 (04:08 +0000)
committermalaterre <malaterre>
Mon, 25 Oct 2004 04:08:19 +0000 (04:08 +0000)
12 files changed:
src/gdcmDicomDir.cxx
src/gdcmDicomDirElement.h
src/gdcmDicomDirObject.cxx
src/gdcmDicomDirPatient.cxx
src/gdcmDicomDirPatient.h
src/gdcmDicomDirSerie.cxx
src/gdcmDicomDirSerie.h
src/gdcmDicomDirStudy.cxx
src/gdcmDicomDirStudy.h
src/gdcmDocEntry.h
src/gdcmFile.h
src/gdcmPixelConvert.h

index 03cc6a20c939c2cdc175ae2db38e06dad6fefaed..68e27d63cac75e1633cefb42811892028aadbb16 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:40 $
-  Version:   $Revision: 1.74 $
+  Date:      $Date: 2004/10/25 04:08:19 $
+  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
@@ -463,10 +463,10 @@ DicomDirMeta * DicomDir::NewMeta()
    }
    else  // after root directory parsing
    {
-     std::list<Element> elemList;
-     elemList=Global::GetDicomDirElements()->GetDicomDirMetaElements();
-     m->FillObject(elemList);
-    }
+      ListDicomDirMetaElem const & elemList = 
+         Global::GetDicomDirElements()->GetDicomDirMetaElements();
+      m->FillObject(elemList);
+   }
    m->SetSQItemNumber(0); // To avoid further missprinting
    return m;  
 }
@@ -476,13 +476,13 @@ DicomDirMeta * DicomDir::NewMeta()
  */
 DicomDirPatient * DicomDir::NewPatient()
 {
-   std::list<Element>::iterator it;
+   ListDicomDirPatientElem::const_iterator it;
    uint16_t tmpGr,tmpEl;
    DictEntry *dictEntry;
    ValEntry *entry;
 
-   std::list<Element> elemList;   
-   elemList=Global::GetDicomDirElements()->GetDicomDirPatientElements(); 
+   ListDicomDirPatientElem const & elemList =
+      Global::GetDicomDirElements()->GetDicomDirPatientElements(); 
    SQItem *s = new SQItem(0);
 
    // for all the DicomDirPatient Elements      
@@ -534,11 +534,11 @@ DicomDirPatient * DicomDir::NewPatient()
  *          GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE ...)
  * @param   header Header of the current file
  */
-void DicomDir::SetElement(std::string &path,DicomDirType type,
-                              Document *header)
+void DicomDir::SetElement(std::string &path, DicomDirType type,
+                          Document *header)
 {
-   std::list<Element> elemList;
-   std::list<Element>::iterator it;
+   ListDicomDirElem elemList; //FIXME this is going to be a by copy operation
+   ListDicomDirElem::const_iterator it;
    uint16_t tmpGr, tmpEl;
    DictEntry *dictEntry;
    ValEntry *entry;
@@ -693,6 +693,7 @@ void DicomDir::SetElement(std::string &path,DicomDirType type,
 
 }
 
+//-----------------------------------------------------------------------------
 /**
  * \brief   CallStartMethod
  */
@@ -706,6 +707,7 @@ void DicomDir::CallStartMethod()
    }
 }
 
+//-----------------------------------------------------------------------------
 /**
  * \ingroup DicomDir
  * \brief   CallProgressMethod
@@ -718,6 +720,7 @@ void DicomDir::CallProgressMethod()
    }
 }
 
+//-----------------------------------------------------------------------------
 /**
  * \ingroup DicomDir
  * \brief   CallEndMethod
@@ -867,7 +870,8 @@ void DicomDir::AddDicomDirSerieToEnd(SQItem *s)
 
       if( (*itp)->GetDicomDirStudies().size() > 0 )
       {
-         ListDicomDirStudy::iterator itst=(*itp)->GetDicomDirStudies().end();
+         ListDicomDirStudy::const_iterator itst = 
+            (*itp)->GetDicomDirStudies().end();
          itst--;
          (*itst)->AddDicomDirSerie(new DicomDirSerie(s, &TagHT));
       }
@@ -888,12 +892,13 @@ void DicomDir::AddDicomDirSerieToEnd(SQItem *s)
 
       if( (*itp)->GetDicomDirStudies().size() > 0 )
       {
-         ListDicomDirStudy::iterator itst = (*itp)->GetDicomDirStudies().end();
+         ListDicomDirStudy::const_iterator itst = 
+            (*itp)->GetDicomDirStudies().end();
          itst--;
 
          if( (*itst)->GetDicomDirSeries().size() > 0 )
          {
-            ListDicomDirSerie::iterator its = (*itst)->GetDicomDirSeries().end();
+            ListDicomDirSerie::const_iterator its = (*itst)->GetDicomDirSeries().end();
             its--;
             (*its)->AddDicomDirImage(new DicomDirImage(s, &TagHT));
          }
index b744729de9e60ebcd6740bdb0e16b3b98ca347b2..9c739802c3bb0d6b9b21703e3154cc3f7b806ae2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/13 14:15:29 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -37,6 +37,7 @@ typedef struct
    std::string Value;
 } Element;
 
+typedef std::list<Element> ListDicomDirElem;
 typedef std::list<Element> ListDicomDirMetaElem;
 typedef std::list<Element> ListDicomDirPatientElem;
 typedef std::list<Element> ListDicomDirStudyElem;
@@ -66,7 +67,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the META Elements of a DICOMDIR.
     */
-   ListDicomDirMetaElem& GetDicomDirMetaElements()
+   ListDicomDirMetaElem const & GetDicomDirMetaElements() const
       { return DicomDirMetaList; };
 
    /**
@@ -74,7 +75,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the PATIENT Elements of a DICOMDIR.
     */      
-   ListDicomDirPatientElem &GetDicomDirPatientElements()
+   ListDicomDirPatientElem const & GetDicomDirPatientElements() const
       { return DicomDirPatientList; };
 
    /**
@@ -82,7 +83,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the STUDY Elements of a DICOMDIR.
     */      
-   ListDicomDirStudyElem   &GetDicomDirStudyElements()
+   ListDicomDirStudyElem const & GetDicomDirStudyElements() const
       { return DicomDirStudyList; };
 
    /**
@@ -90,7 +91,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the SERIE Elements of a DICOMDIR.
     */
-   ListDicomDirSerieElem   &GetDicomDirSerieElements()
+   ListDicomDirSerieElem const & GetDicomDirSerieElements() const
       { return DicomDirSerieList; };
 
    /**
@@ -98,7 +99,7 @@ public:
     * \brief   returns a reference to the chained List 
     *          related to the IMAGE Elements of a DICOMDIR.
     */
-   ListDicomDirImageElem   &GetDicomDirImageElements()
+   ListDicomDirImageElem const & GetDicomDirImageElements() const
       { return DicomDirImageList; };
 
 private:
index fca87916eb972a91d3be5dc0d82fadd087130330..3997b0f2697e59ceadabc308c953462dd253b09b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/25 03:35:19 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,7 +83,7 @@ void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList)
 {
   // FillObject rempli le SQItem qui sera accroche au bon endroit
 
-   std::list<Element>::const_iterator it;
+   ListDicomDirMetaElem::const_iterator it;
    uint16_t tmpGr,tmpEl;
    DictEntry *dictEntry;
    ValEntry *entry;
index fd2b25474ce3498e2ac3e6a3c2fb86089430023d..66f58f0529f115ea7ddedb41468332b808183a28 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/25 03:35:19 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -49,8 +49,9 @@ DicomDirPatient::DicomDirPatient(TagDocEntryHT* ptagHT):
  */
 DicomDirPatient::~DicomDirPatient() 
 {
-   for(ListDicomDirStudy::iterator cc = studies.begin();
-                                   cc != studies.end(); ++cc)
+   for(ListDicomDirStudy::const_iterator cc = Studies.begin();
+                                         cc != Studies.end(); 
+                                       ++cc )
    {
       delete *cc;
    }
@@ -67,8 +68,9 @@ void DicomDirPatient::Print(std::ostream& os)
    os << "PATIENT" << std::endl;
    DicomDirObject::Print(os);
 
-   for(ListDicomDirStudy::iterator cc = studies.begin();
-                                   cc != studies.end(); ++cc)
+   for(ListDicomDirStudy::const_iterator cc = Studies.begin();
+                                         cc != Studies.end(); 
+                                       ++cc )
    {
       (*cc)->SetPrintLevel(PrintLevel);
       (*cc)->Print(os);
@@ -83,7 +85,9 @@ void DicomDirPatient::Write(std::ofstream* fp, FileType t)
 {
    DicomDirObject::Write(fp, t);
 
-   for(ListDicomDirStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
+   for(ListDicomDirStudy::iterator cc = Studies.begin();
+                                   cc!= Studies.end();
+                                 ++cc )
    {
       (*cc)->Write( fp, t );
    }
@@ -97,13 +101,13 @@ void DicomDirPatient::Write(std::ofstream* fp, FileType t)
  */
 DicomDirStudy* DicomDirPatient::NewStudy()
 {
-   std::list<Element> elemList = 
+   ListDicomDirStudyElem const & elemList = 
       Global::GetDicomDirElements()->GetDicomDirStudyElements();
       
    DicomDirStudy* st = new DicomDirStudy( PtagHT );
    st->FillObject(elemList);
 
-   studies.push_front(st);
+   Studies.push_front(st);
    return st; 
 }   
 
index 4302ca2008cf1af76fc4713c7a3519acafeca84d..c9f2b4c5b9dfb1cb3d7875f1cc53de6919c1f981 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:41 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  Version:   $Revision: 1.12 $
                                                                                 
   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,14 @@ public:
 
    ~DicomDirPatient();
 
-   virtual void Print(std::ostream &os = std::cout);
-   virtual void Write(std::ofstream *fp, FileType t);
+   void Print(std::ostream &os = std::cout);
+   void Write(std::ofstream *fp, FileType t);
+
    /// Returns the STUDY chained List for this PATIENT.
-   ListDicomDirStudy &GetDicomDirStudies() { 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); };
+   void AddDicomDirStudy (DicomDirStudy *obj) { Studies.push_back(obj); };
 
    ///  TODO
    DicomDirStudy* NewStudy(); 
@@ -52,7 +53,7 @@ public:
 private:
 
    /// chained list of DicomDirStudy
-   ListDicomDirStudy studies;
+   ListDicomDirStudy Studies;
 };
 } // end namespace gdcm
 
index e88d0f0389d88806bef19b088185b28ff35f45a7..9a0a991d68848afc01399f3fda792a87ceea9df5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/25 03:35:19 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -51,8 +51,8 @@ DicomDirSerie::DicomDirSerie(TagDocEntryHT* ptagHT):
  */
 DicomDirSerie::~DicomDirSerie() 
 {
-   for(ListDicomDirImage::iterator cc = images.begin();
-                                   cc != images.end();
+   for(ListDicomDirImage::iterator cc = Images.begin();
+                                   cc != Images.end();
                                    ++cc)
    {
       delete *cc;
@@ -70,8 +70,8 @@ void DicomDirSerie::Print(std::ostream& os)
    os << "SERIE" << std::endl;
    DicomDirObject::Print(os);
 
-   for(ListDicomDirImage::iterator cc = images.begin();
-                                   cc != images.end();
+   for(ListDicomDirImage::iterator cc = Images.begin();
+                                   cc != Images.end();
                                    ++cc)
    {
       (*cc)->SetPrintLevel(PrintLevel);
@@ -90,7 +90,9 @@ void DicomDirSerie::Write(std::ofstream* fp, FileType t)
 {
    DicomDirObject::Write(fp, t);
 
-   for(ListDicomDirImage::iterator cc = images.begin();cc!=images.end();++cc)
+   for(ListDicomDirImage::iterator cc = Images.begin();
+                                   cc!= Images.end();
+                                 ++cc )
    {
       (*cc)->Write( fp, t );
    }
@@ -101,12 +103,12 @@ void DicomDirSerie::Write(std::ofstream* fp, FileType t)
  */
 DicomDirImage* DicomDirSerie::NewImage()
 {
-   std::list<Element> elemList = 
+   ListDicomDirImageElem const & elemList = 
       Global::GetDicomDirElements()->GetDicomDirImageElements();
 
    DicomDirImage* st = new DicomDirImage(PtagHT);
    FillObject(elemList);
-   images.push_front(st);
+   Images.push_front(st);
 
    return st;   
 } 
index 26e61c47b5b3121566b4c2a4d79d03eafc6011d0..e4d57b33aa1d0f59ec806533a5a60e838fc8bfde 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:41 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -21,9 +21,9 @@
 
 #include "gdcmDicomDirObject.h"
 #include "gdcmDicomDirImage.h"
+
 namespace gdcm 
 {
-
 //-----------------------------------------------------------------------------
 typedef std::list<DicomDirImage *> ListDicomDirImage;
 
@@ -36,18 +36,20 @@ public:
 
    ~DicomDirSerie();
 
-   virtual void Print( std::ostream& os = std::cout );
-   virtual void Write( std::ofstream* fp, FileType t );
-/**
- * \ingroup DicomDirSerie
- * \brief   returns the IMAGE chained List for this SERIE.
- */
-   ListDicomDirImage& GetDicomDirImages() { return images; };
-/**
- * \ingroup DicomDirSerie
- * \brief   adds the passed IMAGE to the IMAGE chained List for this SERIE.
- */       
-   void AddDicomDirImage(DicomDirImage *obj) { images.push_back(obj); };
+   void Print( std::ostream& os = std::cout );
+   void Write( std::ofstream* fp, FileType t );
+
+   /**
+    * \ingroup DicomDirSerie
+    * \brief   returns the IMAGE chained List for this SERIE.
+    */
+   ListDicomDirImage const & GetDicomDirImages() const { return Images; };
+
+   /**
+    * \ingroup DicomDirSerie
+    * \brief   adds the passed IMAGE to the IMAGE chained List for this SERIE.
+    */       
+   void AddDicomDirImage(DicomDirImage *obj) { Images.push_back(obj); };
 
 /**
  * \ingroup DicomDirSerie
@@ -59,7 +61,7 @@ private:
 /**
 * \brief chained list of DicomDirImages
 */ 
-   ListDicomDirImage images;
+   ListDicomDirImage Images;
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
index d035f1ab1e0935d7f8c8fd3b716b2005d3b66168..a9ebc4f8c3c26dec8ad8884d72c4d94bc9c6f7f7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/25 03:35:19 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -53,7 +53,9 @@ DicomDirStudy::DicomDirStudy(TagDocEntryHT* ptagHT):
  */
 DicomDirStudy::~DicomDirStudy() 
 {
-   for(ListDicomDirSerie::iterator cc = series.begin();cc != series.end();++cc)
+   for(ListDicomDirSerie::iterator cc = Series.begin();
+                                   cc != Series.end();
+                                 ++cc )
    {
       delete *cc;
    }
@@ -71,8 +73,8 @@ void DicomDirStudy::Print(std::ostream& os)
    os << "STUDY" << std::endl;
    DicomDirObject::Print(os);
 
-   for(ListDicomDirSerie::iterator cc = series.begin();
-                                   cc != series.end();
+   for(ListDicomDirSerie::iterator cc = Series.begin();
+                                   cc != Series.end();
                                    ++cc)
    {
       (*cc)->SetPrintLevel(PrintLevel);
@@ -91,7 +93,9 @@ void DicomDirStudy::Write(std::ofstream* fp, FileType t)
 {
    DicomDirObject::Write(fp, t);
 
-   for(ListDicomDirSerie::iterator cc = series.begin();cc!=series.end();++cc)
+   for(ListDicomDirSerie::iterator cc = Series.begin();
+                                   cc!= Series.end();
+                                 ++cc )
    {
       (*cc)->Write( fp, t );
    }
@@ -104,12 +108,12 @@ void DicomDirStudy::Write(std::ofstream* fp, FileType t)
  */
 DicomDirSerie* DicomDirStudy::NewSerie()
 {
-   std::list<Element> elemList = 
+   ListDicomDirSerieElem const & elemList = 
       Global::GetDicomDirElements()->GetDicomDirSerieElements();   
 
    DicomDirSerie* st = new DicomDirSerie(PtagHT);
    FillObject(elemList);
-   series.push_front(st);
+   Series.push_front(st);
 
    return st;  
 }   
index 965dfbcb5f7f48bed930d773a3137b387fabb5c4..a71685e7423d61abb5e2e5c81335ec0f85cf5a42 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:41 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -36,30 +36,32 @@ public:
 
    ~DicomDirStudy();
 
-   virtual void Print(std::ostream &os = std::cout);
-   virtual void Write(std::ofstream *fp, FileType t);
-/**
- * \ingroup DicomDirStudy
- * \brief   returns the SERIE chained List for this STUDY.
- */
-   ListDicomDirSerie &GetDicomDirSeries() { return series; };
-/**
- * \ingroup DicomDirStudy
- * \brief   adds the passed SERIE to the SERIE chained List for this STUDY.
- */ 
-   void AddDicomDirSerie(DicomDirSerie *obj) { series.push_back(obj); };
+   void Print(std::ostream &os = std::cout);
+   void Write(std::ofstream *fp, FileType t);
 
-/**
- * \ingroup DicomDirStudy
- * \brief   TODO
- */ 
+   /**
+    * \ingroup DicomDirStudy
+    * \brief   returns the SERIE chained List for this STUDY.
+    */
+   ListDicomDirSerie const &GetDicomDirSeries() const { return Series; };
+
+   /**
+    * \ingroup DicomDirStudy
+    * \brief   adds the passed SERIE to the SERIE chained List for this STUDY.
+    */ 
+   void AddDicomDirSerie(DicomDirSerie *obj) { Series.push_back(obj); };
+
+   /**
+    * \ingroup DicomDirStudy
+    * \brief   TODO
+    */ 
    DicomDirSerie* NewSerie();
     
 private:
 /**
 * \brief chained list of DicomDirSeries (to be exploited recursively)
 */ 
-   ListDicomDirSerie series;
+   ListDicomDirSerie Series;
 };
 } // end namespace gdcm
 
index 8c909273175a050eb93ed036b4a73d383d2c035e..45cf710fd3787229e7d173e18b7ead1742cc9748 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:41 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -29,8 +29,6 @@ class SeqEntry;
 
 namespace gdcm 
 {
-
-
 //-----------------------------------------------------------------------------
 /**
  * \brief   The dicom header of a Dicom file contains a set of such entries
@@ -49,24 +47,24 @@ public:
    uint16_t      GetElement()   { return DicomDict->GetElement();};
 
    /// Returns the 'key' of the current Dicom Header Entry
-   void  SetKey( TagKey key ) { Key = key; }
+   void  SetKey( TagKey const & key ) { Key = key; }
 
    /// Returns the 'key' of the current Dicom Header Entry
-   std::string GetKey() { 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  GetName()      { 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  GetVR()        { 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
    /// \warning offset of the *value*, not of the Dicom Header Entry
-   size_t       GetOffset()    { return Offset;             };
+   size_t GetOffset() { return Offset; };
 
    /// \brief Returns the actual value length of the current Dicom Header Entry
    /// \warning this value is not *always* the one stored in the Dicom Header
@@ -80,11 +78,11 @@ public:
    uint32_t GetReadLength() { return ReadLength; };
 
    /// Sets the 'Value Representation' of the current Dicom Header Entry
-   void SetVR(std::string 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
-   void SetLength(uint32_t l) { ReadLength = UsableLength = l;};
+   void SetLength(uint32_t l) { ReadLength = UsableLength = l; };
       
    // The following 3 members, for internal use only ! 
    
index 0cde71458e8cdcb3a5c3690849b99dd9f09d28c0..5e30d57e70b6fd22293eed87c7b2a14a62f2fdfd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 13:56:46 $
-  Version:   $Revision: 1.66 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  Version:   $Revision: 1.67 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,13 +44,13 @@ public:
    Header* GetHeader() { return HeaderInternal; }
 
    /// Accessor to \ref ImageDataSize
-   size_t GetImageDataSize(){ return ImageDataSize; };
+   size_t GetImageDataSize() { return ImageDataSize; };
 
    /// Accessor to \ref ImageDataSizeRaw
-   size_t GetImageDataSizeRaw(){ return ImageDataSizeRaw; };
+   size_t GetImageDataSizeRaw() { return ImageDataSizeRaw; };
 
    /// Accessor to \ref PixelConverter
-   PixelConvert* GetPixelConverter(){ return PixelConverter; };
+   PixelConvert* GetPixelConverter() { return PixelConverter; };
 
    uint8_t* GetImageData();
    size_t GetImageDataIntoVector(void* destination, size_t maxSize);
index 13c20822786a9b60437855b6e0b1f9413d6cde6a..074db2ba22c52362815e112674491c8a46063087 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelConvert.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/22 03:05:42 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  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
@@ -18,7 +18,7 @@
 
 
 #ifndef GDCMPIXELCONVERT_H
-#define GDCMPIXELCONVERTL_H
+#define GDCMPIXELCONVERT_H
 
 #include "gdcmCommon.h"
 #include "gdcmRLEFramesInfo.h"
 
 namespace gdcm
 {
-                                                                                
 /*
  * \brief Utility container for gathering the various forms the pixel data
  *        migth take during the user demanded processes.
  */
-class GDCM_EXPORT PixelConvert {
+class GDCM_EXPORT PixelConvert
+{
 public:
    PixelConvert();
    ~PixelConvert();