]> Creatis software - gdcm.git/commitdiff
Typo
authorjpr <jpr>
Wed, 26 Jan 2005 09:49:53 +0000 (09:49 +0000)
committerjpr <jpr>
Wed, 26 Jan 2005 09:49:53 +0000 (09:49 +0000)
Example/TestPapyrus.cxx
src/gdcmContentEntry.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDirElement.h
src/gdcmDocEntry.cxx
src/gdcmDocEntrySet.cxx
src/gdcmDocument.cxx
src/gdcmFile.cxx
src/gdcmSQItem.cxx

index d82083b02e805cc7293fe178f7a269ed5451b29d..1dd3e14487effed7e287852f42cae8540d2c084b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPapyrus.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/26 09:49:53 $
+  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
@@ -147,7 +147,6 @@ int main(int argc, char* argv[])
    // inside the loop
 
    // Get caracteristics of the first image
-
    SamplesPerPixel     = sqi->GetEntryValue(0x0028,0x0002);
    Rows                = sqi->GetEntryValue(0x0028,0x0010);
    Columns             = sqi->GetEntryValue(0x0028,0x0011);
@@ -165,20 +164,10 @@ int main(int argc, char* argv[])
    int lgrImage = iRows*iColumns * iSamplesPerPixel * (iBitsAllocated/8);
 
    // compute number of images
-
    int nbImages = seqPapyrus->GetNumberOfSQItems();
-/*
-   int nbImages = 0;
-   while (sqi)
-   {
-      nbImages++;
-      sqi =  seqPapyrus->GetNextSQItem();
-   }
-*/
    std::cout <<"Number of frames :" << nbImages << std::endl;  
 
    //  allocate enough room to get the pixels of all images.
-
    uint8_t *PixelArea = new uint8_t[lgrImage*nbImages];
    uint8_t *currentPosition = PixelArea;
   gdcm::BinEntry *pixels;
@@ -234,7 +223,7 @@ int main(int argc, char* argv[])
    n->InsertValEntry(MediaStSOPinstUID,  0x0002,0x0002);
   // Whe keep default gdcm Transfer Syntax (Explicit VR Little Endian)
   // since using Papyrus one (Implicit VR Little Endian) is a mess
-   //n->Insert(TransferSyntax,     0x0002,0x0010);
+   //n->InsertValEntry(TransferSyntax,     0x0002,0x0010);
    n->InsertValEntry(StudyDate,          0x0008,0x0020);
    n->InsertValEntry(StudyTime,          0x0008,0x0030);
    n->InsertValEntry(Modality,           0x0008,0x0060);
index 3c1ed7c4ea193633014feb654431c1424dfb3e86..c09cfb787b8fd286d20d138a04965e0a01746247 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmContentEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 16:32:45 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/26 09:49:53 $
+  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
 namespace gdcm 
 {
 
-// CLEAN ME
-#define MAX_SIZE_PRINT_ELEMENT_VALUE 128
-
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 /**
- * \brief   Constructor from a given DictEntry
+ * \brief   Constructor for a given DictEntry
  * @param   e Pointer to existing dictionary entry
  */
 ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
@@ -43,7 +40,7 @@ ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
 }
 
 /**
- * \brief   Constructor from a given DocEntry
+ * \brief   Constructor for a given DocEntry
  * @param   e Pointer to existing Doc entry
  */
 ContentEntry::ContentEntry(DocEntry *e)
@@ -64,7 +61,7 @@ ContentEntry::~ContentEntry ()
 // Public
 
 /**
- * \brief   Writes the std::string representable' value of a ContentEntry
+ * \brief   Writes the 'std::string representable' value of a ContentEntry
  * @param fp already open ofstream pointer
  * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
index 97d1f3dec03d6e7b2a80e8b695b216e62da6c81e..80591ac05bf9a4e85735d0aa589d3ee645ccb890 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:23 $
-  Version:   $Revision: 1.118 $
+  Date:      $Date: 2005/01/26 09:49:53 $
+  Version:   $Revision: 1.119 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -472,7 +472,6 @@ DicomDirMeta *DicomDir::NewMeta()
  //                  to be able to remove any direct reference to TagHT
    DocEntry *entry = GetFirstEntry();
    if( entry )
-   //if ( TagHT.begin() != TagHT.end() ) // after Document Parsing
    { 
       MetaElems = new DicomDirMeta(true);
 
@@ -487,16 +486,6 @@ DicomDirMeta *DicomDir::NewMeta()
 
          entry = GetFirstEntry();
       }
-      /*TagDocEntryHT::iterator lastOneButSequence = TagHT.end();
-      lastOneButSequence --;
-      // ALL the 'out of Sequence' Tags belong to Meta Elems
-      // (we skip 0004|1220 [Directory record sequence] )
-      for ( TagDocEntryHT::iterator cc  = TagHT.begin(); 
-                                    cc != lastOneButSequence;
-                                   ++cc)
-      {
-         MetaElems->AddEntry( cc->second );
-      }*/
    }
    else  // after root directory parsing
    {
@@ -830,9 +819,6 @@ void DicomDir::CreateDicomDir()
          // neither an 'IMAGE' SQItem. Skip to next item.
          continue;
       }
-
-      //if( si )
-         //MoveSQItem(si,tmpSI);
       tmpSI=s->GetNextSQItem();
    }
 // friend hunting : this one will be difficult to remove !
index 33b3a34f29e6826d12a67f36622a389038715960..c2b1afe7bc2e0998c3909ef71b89364593e14aad 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:11 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/26 09:49:53 $
+  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
@@ -27,6 +27,10 @@ namespace gdcm
 {
 
 //-----------------------------------------------------------------------------
+/**
+ * \brief internal structure, not end user intended
+ *        shouln't appear here
+ */  
 GDCM_EXPORT typedef struct
 {
    /// DicomGroup number
@@ -46,7 +50,6 @@ typedef std::list<Element> ListDicomDirImageElem;
 
 //-----------------------------------------------------------------------------
 /**
- * \ingroup DicomDirElement
  * \brief   Represents elements contained in a DicomDir
  *           class for the chained lists from the file 'Dicts/DicomDir.dic'
  */
@@ -70,7 +73,6 @@ public:
       { return DicomDirMetaList; };
 
    /**
-    * \ingroup DicomDirElement
     * \brief   returns a reference to the chained List 
     *          related to the PATIENT Elements of a DICOMDIR.
     */      
@@ -78,7 +80,6 @@ public:
       { return DicomDirPatientList; };
 
    /**
-    * \ingroup DicomDirElement
     * \brief   returns a reference to the chained List 
     *          related to the STUDY Elements of a DICOMDIR.
     */      
@@ -86,7 +87,6 @@ public:
       { return DicomDirStudyList; };
 
    /**
-    * \ingroup DicomDirElement
     * \brief   returns a reference to the chained List 
     *          related to the SERIE Elements of a DICOMDIR.
     */
@@ -94,7 +94,6 @@ public:
       { return DicomDirSerieList; };
 
    /**
-    * \ingroup DicomDirElement
     * \brief   returns a reference to the chained List 
     *          related to the IMAGE Elements of a DICOMDIR.
     */
index 8dd098b0f2b55a53a116d5ced99db80ea3974572..c8e5b4baa328e4057b3f83aa7d39c1a9646e9ec4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 16:10:52 $
-  Version:   $Revision: 1.46 $
+  Date:      $Date: 2005/01/26 09:49:53 $
+  Version:   $Revision: 1.47 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -150,11 +150,8 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
          // Hence we skip writing the VR.
          // In order to avoid further troubles, we choose to write them
          // as 'no-length' Item Delimitors (we pad by writing 0xffffffff)
-         // The end of a given Item will be found when  :
-         //  - a new Item Delimitor Item is encountered (the Seq goes on)
-         //  - a Sequence Delimitor Item is encountered (the Seq just ended)
-
-         // TODO : verify if the Sequence Delimitor Item was forced during Parsing 
+         // We shall force the end of a given Item by writting 
+         //  a Item Delimitation Item (fffe, e00d)
 
          uint32_t ff = 0xffffffff;
          binary_write(*fp, ff);
index 0616a1b699d88c8fbac4c7565381e0962c55ada2..9a44fc31942338bdafbe6a76873aac49f9c8fb51 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 16:32:45 $
-  Version:   $Revision: 1.46 $
+  Date:      $Date: 2005/01/26 09:49:54 $
+  Version:   $Revision: 1.47 $
                                                                                 
   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 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 // Public
 /**
- * \brief   Get the (std::string representable) value of the Dicom entry
+ * \brief   Get the "std::string representable" value of the Dicom entry
  * @param   group  Group number of the searched tag.
  * @param   elem Element number of the searched tag.
  * @return  Corresponding element value when it exists,
@@ -48,7 +48,6 @@ std::string DocEntrySet::GetEntryValue(uint16_t group, uint16_t elem)
 
 /**
  * \brief   Gets (from Header) a 'non string' element value 
- *          (LoadElementValues has already be executed)  
  * @param group   group number of the Entry 
  * @param elem  element number of the Entry
  * @return Pointer to the 'non string' area
@@ -79,7 +78,7 @@ int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
 
 /**
  * \brief   Searches within Header Entries (Dicom Elements) parsed with 
- *          the public and private dictionaries 
+ *          the public [and private dictionaries] 
  *          for the element value representation of a given tag..
  *          Obtaining the VR (Value Representation) might be needed by caller
  *          to convert the string typed content to caller's native type 
@@ -119,15 +118,19 @@ ValEntry *DocEntrySet::GetValEntry(uint16_t group, uint16_t elem)
  * \brief  Same as \ref Document::GetDocEntry except it only
  *         returns a result when the corresponding entry is of type
  *         BinEntry.
- * @param   group  Group number of the searched Dicom Element 
- * @param   elem Element number of the searched Dicom Element  
+ * @param   group  Group number of the searched Dicom Element
+ * @param   elem Element number of the searched Dicom Element
  * @return When present, the corresponding BinEntry. 
  */
 BinEntry *DocEntrySet::GetBinEntry(uint16_t group, uint16_t elem)
 {
    DocEntry *currentEntry = GetDocEntry(group, elem);
    if ( !currentEntry )
+   {
+      gdcmVerboseMacro( "No corresponding BinEntry " << std::hex << group <<
+                         "," << elem);
       return NULL;
+   }
 
    return dynamic_cast<BinEntry*>(currentEntry);
 }
@@ -144,7 +147,11 @@ SeqEntry *DocEntrySet::GetSeqEntry(uint16_t group, uint16_t elem)
 {
    DocEntry *currentEntry = GetDocEntry(group, elem);
    if ( !currentEntry )
+   {
+      gdcmVerboseMacro( "No corresponding SeqEntry " << std::hex << group <<
+                        "," << elem);
       return NULL;
+   }
 
    return dynamic_cast<SeqEntry*>(currentEntry);
 }
@@ -163,7 +170,8 @@ bool DocEntrySet::SetValEntry(std::string const& content,
    ValEntry *entry = GetValEntry(group, elem);
    if (!entry )
    {
-      gdcmVerboseMacro( "No corresponding ValEntry (try promotion first).");
+      gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+                         "," << elem << " element (try promotion first).");
       return false;
    }
    return SetValEntry(content,entry);
@@ -178,13 +186,14 @@ bool DocEntrySet::SetValEntry(std::string const& content,
  * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool DocEntrySet::SetBinEntry(uint8_t*content, int lgth, 
+bool DocEntrySet::SetBinEntry(uint8_t *content, int lgth, 
                               uint16_t group, uint16_t elem) 
 {
    BinEntry *entry = GetBinEntry(group, elem);
    if (!entry )
    {
-      gdcmVerboseMacro( "No corresponding ValEntry (try promotion first).");
+      gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+                        "," << elem << " element (try promotion first).");
       return false;
    }
 
@@ -532,8 +541,8 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
 
 
 /**
- * \brief   Searches both the public and the shadow dictionary (when they
- *          exist) for the presence of the DictEntry with given
+ * \brief   Searches [both] the public [and the shadow dictionary (when they
+ *          exist)] for the presence of the DictEntry with given
  *          group and element, and create a new virtual DictEntry if necessary
  * @param   group  group number of the searched DictEntry
  * @param   elem element number of the searched DictEntry
index fcf5c2907f8eea675782437ac0bca88153ac2b7c..5a66053d1aef75e2dcfc962edbfd1a139142b26a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:23 $
-  Version:   $Revision: 1.210 $
+  Date:      $Date: 2005/01/26 09:49:54 $
+  Version:   $Revision: 1.211 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -192,6 +192,7 @@ Document::~Document ()
 
 /**
   * \brief   Prints The Dict Entries of THE public Dicom Dictionary
+  * @param os ostream to print to
   * @return
   */  
 void Document::PrintPubDict(std::ostream &os)
@@ -202,6 +203,7 @@ void Document::PrintPubDict(std::ostream &os)
 
 /**
   * \brief   Prints The Dict Entries of THE shadow Dicom Dictionary
+  * @param os ostream to print to
   * @return
   */
 void Document::PrintShaDict(std::ostream &os)
@@ -432,7 +434,6 @@ bool Document::CloseFile()
       delete Fp;
       Fp = 0;
    }
-
    return true; //FIXME how do we detect a non-closed ifstream ?
 }
 
@@ -441,14 +442,15 @@ bool Document::CloseFile()
  * @param fp file pointer on an already open file (actually: Output File Stream)
  * @param filetype Type of the File to be written 
  *          (ACR-NEMA, ExplicitVR, ImplicitVR)
- * \return Always true.
+ * @return Always true.
  */
 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  
-   /// (necessary if user wants to write a DICOM V3 file
-   /// starting from an  ACR-NEMA (V2)  Header
+   // \TODO move the following lines (and a lot of others, to be written)
+   // to a future function CheckAndCorrectHeader  
+
+   // (necessary if user wants to write a DICOM V3 file
+   // starting from an ACR-NEMA (V2) Header
 
    if ( filetype == ImplicitVR || filetype == ExplicitVR )
    {
@@ -459,7 +461,7 @@ void Document::WriteContent(std::ofstream *fp, FileType filetype)
       fp->write("DICM", 4);
    }
 
-/**
+/*
  * \todo rewrite later, if really usefull
  *       - 'Group Length' element is optional in DICOM
  *       - but un-updated odd groups lengthes can causes pb
index 17e4a80acc2099687a9720bf6555b3c09e1f61c1..c58c833441671c7ee0801186db21af57e44943d8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:24 $
-  Version:   $Revision: 1.200 $
+  Date:      $Date: 2005/01/26 09:49:54 $
+  Version:   $Revision: 1.201 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -587,9 +587,6 @@ int File::GetNumberOfScalarComponentsRaw()
 //                                   or Location       (0020,0050) 
 // as the Z coordinate, 
 // 0. for all the coordinates if nothing is found
-
-// \todo find a way to inform the caller nothing was found
-// \todo How to tell the caller a wrong number of values was found?
 //
 // ---------------------------------------------------------------
 //
@@ -612,7 +609,6 @@ float File::GetXOrigin()
       if ( strImPos == GDCM_UNFOUND )
       {
          gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
-         /// \todo How to tell the caller nothing was found ?
          return 0.;
       }
    }
@@ -643,7 +639,6 @@ float File::GetYOrigin()
       if ( strImPos == GDCM_UNFOUND )
       {
          gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
-         /// \todo How to tell the caller nothing was found ?
          return 0.;
       }  
    }
@@ -1093,7 +1088,6 @@ size_t File::GetPixelOffset()
    }
 }
 
-/// \todo TODO : unify those two (previous one and next one)
 /**
  * \brief   Recover the pixel area length (in Bytes)
  * @return Pixel Element Length, as stored in the header
index 0431202ca3bbf3c16c1f69236af1d0baa5c45fb6..bb90758205b3a6a805c339bce73da66db3987f4d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:24 $
-  Version:   $Revision: 1.60 $
+  Date:      $Date: 2005/01/26 09:49:54 $
+  Version:   $Revision: 1.61 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -161,7 +161,6 @@ void SQItem::ClearEntry()
 bool SQItem::AddEntry(DocEntry *entry)
 {
    DocEntries.push_back(entry);
-   //TODO : check if it worked
    return true;
 }   
 
@@ -230,13 +229,10 @@ DocEntry * SQItem::GetFirstEntry()
  */
 DocEntry *SQItem::GetNextEntry()
 {
-  // gdcmAssertMacro (ItDocEntries != DocEntries.end());
-   {
-      ++ItDocEntries;
-      if (ItDocEntries != DocEntries.end())
-         return  *ItDocEntries;
-      return NULL;
-   }
+   ++ItDocEntries;
+   if (ItDocEntries != DocEntries.end())
+      return  *ItDocEntries;
+   return NULL;
 }
 
 /**
@@ -250,7 +246,7 @@ DocEntry *SQItem::GetDocEntry(uint16_t group, uint16_t elem)
    for(ListDocEntry::iterator i = DocEntries.begin();
                               i != DocEntries.end(); ++i)
    {
-      if ( (*i)->GetGroup()==group && (*i)->GetElement()==elem )
+      if ( (*i)->GetGroup() == group && (*i)->GetElement() == elem )
          return *i;
    }
    return NULL;