]> Creatis software - gdcm.git/commitdiff
mistyping corrected
authorjpr <jpr>
Tue, 1 Jul 2003 15:48:27 +0000 (15:48 +0000)
committerjpr <jpr>
Tue, 1 Jul 2003 15:48:27 +0000 (15:48 +0000)
src/gdcmDict.cxx
src/gdcmDictSet.cxx
src/gdcmDictSet.h
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmUtil.cxx

index acd88f8931c9cf2664dc7812b7f94139351ca10e..2b8dff9e2b58fa2e9b86696cd694b6ecbcf99272 100644 (file)
@@ -52,7 +52,7 @@ gdcmDict::~gdcmDict() {
    }
    KeyHt.clear();
    // Since AddNewEntry adds symetrical in both KeyHt and NameHT we can
-   // assume all the pointed gdcmDictEntries are allready cleaned-up when
+   // assume all the pointed gdcmDictEntries are already cleaned-up when
    // we cleaned KeyHt.
    NameHt.clear();
 }
@@ -151,7 +151,7 @@ int gdcmDict::ReplaceEntry(gdcmDictEntry* NewEntry) {
    key = NewEntry->GetKey();
        
    if(KeyHt.count(key) == 1) {
-      dbg.Verbose(1, "gdcmDict::AddNewEntry allready present", key.c_str());
+      dbg.Verbose(1, "gdcmDict::AddNewEntry already present", key.c_str());
       return(0);
    } else {
       KeyHt[NewEntry->GetKey()] = NewEntry;
index 5262e30de29e1331d03867b8f8a4458e88fb8872..d75a14e21b94249cc5d8cd60a2ce7f823432ee26 100644 (file)
@@ -99,7 +99,7 @@ gdcmDictSet::~gdcmDictSet() {
 /**
  * \ingroup gdcmDictSet
  * \brief   Loads a dictionary from a specified file, and add it
- *          to allready the existing ones contained in this gdcmDictSet.
+ *          to already the existing ones contained in this gdcmDictSet.
  * @param   FileName Absolute or relative filename containing the
  *          dictionary to load.
  * @param   Name Symbolic name that be used as identifier of the newly 
index 56fcc33d8d3d2ea0af7dc21f1ccece5a64f9b7d6..f71a1eb8d447aaa977d1a23dcaafa13528b1d34b 100644 (file)
@@ -14,7 +14,7 @@ typedef std::map<DictKey, gdcmDict*> DictSetHT;
  * \defgroup gdcmDictSet
  * \brief  Container for managing a set of loaded dictionaries.
  * \note   Hopefully, sharing dictionaries should avoid
- * \par    reloading an allready loaded dictionary (saving time)
+ * \par    reloading an already loaded dictionary (saving time)
  * \par    having many in memory representations of the same dictionary
  *        (saving memory).
  */
index bf7142b3edaa55bf46406fb633ec43daf745dfe9..e9bf7081b0321b3c8ff4516253f3469f294095a2 100644 (file)
@@ -16,7 +16,7 @@ class GDCM_EXPORT gdcmFile: public gdcmHeader
 private:
    void* PixelData;
    size_t lgrTotale;
-   int Parsed;               // weather allready parsed
+   int Parsed;               // weather already parsed
    std::string OrigFileName; // To avoid file overwrite
    void SwapZone(void* im, int swap, int lgr, int nb);
    bool ReadPixelData(void * destination);
index c03e3419df4b815d2302646f4ed56f5673c29c70..b280fd62ca0cbcd718182c7551bb43de47429793 100644 (file)
@@ -1,4 +1,5 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.73 2003/07/01 10:04:36 frog Exp $
+
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.74 2003/07/01 15:48:27 jpr Exp $
 
 #include <stdio.h>
 #include <cerrno>
@@ -1043,10 +1044,10 @@ int gdcmHeader::ReplaceOrCreateByNumber(string Value, guint16 Group, guint16 Ele
        // on affecte une valeur a cette ElValue a l'interieur du ElValSet
        // --> devrait pouvoir etre fait + simplement ???
        
-       gdcmElValue* nvElValue=NewElValueByNumber(Group, Elem);
-       PubElValSet.Add(nvElValue);     
-       PubElValSet.SetElValueByNumber(Value, Group, Elem);
-       return(1);
+   gdcmElValue* nvElValue=NewElValueByNumber(Group, Elem);
+   PubElValSet.Add(nvElValue); 
+   PubElValSet.SetElValueByNumber(Value, Group, Elem);
+   return(1);
 }   
 
 
@@ -1057,11 +1058,11 @@ int gdcmHeader::ReplaceOrCreateByNumber(string Value, guint16 Group, guint16 Ele
  */
 int gdcmHeader::ReplaceOrCreateByNumber(char* Value, guint16 Group, guint16 Elem ) {
 
-       gdcmElValue* nvElValue=NewElValueByNumber(Group, Elem);
-       PubElValSet.Add(nvElValue);
-       string v = Value;       
-       PubElValSet.SetElValueByNumber(v, Group, Elem);
-       return(1);
+   gdcmElValue* nvElValue=NewElValueByNumber(Group, Elem);
+   PubElValSet.Add(nvElValue);
+   string v = Value;   
+   PubElValSet.SetElValueByNumber(v, Group, Elem);
+   return(1);
 }  
 
 /**
@@ -1070,8 +1071,8 @@ int gdcmHeader::ReplaceOrCreateByNumber(char* Value, guint16 Group, guint16 Elem
  * @param   
  */
  
- int gdcmHeader::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
-       return (PubElValSet.CheckIfExistByNumber(Group, Elem));
+int gdcmHeader::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
+   return (PubElValSet.CheckIfExistByNumber(Group, Elem));
  }
  
  
@@ -1112,7 +1113,7 @@ gdcmElValue * gdcmHeader::ReadNextElement(void) {
    
    if ( (g==0x7fe0) && (n==0x0010) ) 
        if (DEBUG) 
-               printf("in gdcmHeader::ReadNextElement try to read 7fe0 0010 \n");
+          printf("in gdcmHeader::ReadNextElement try to read 7fe0 0010 \n");
    
    if (errno == 1)
       // We reached the EOF (or an error occured) and header parsing
@@ -1129,8 +1130,8 @@ gdcmElValue * gdcmHeader::ReadNextElement(void) {
    }
    NewElVal->SetOffset(ftell(fp));  
    if ( (g==0x7fe0) && (n==0x0010) ) 
-       if (DEBUG) 
-               printf("sortie de gdcmHeader::ReadNextElement 7fe0 0010 \n");
+      if (DEBUG) 
+         printf("sortie de gdcmHeader::ReadNextElement 7fe0 0010 \n");
    return NewElVal;
 }
 
@@ -1627,7 +1628,6 @@ int gdcmHeader::GetZSize(void) {
    return 1;
 }
 
-
 /**
  * \ingroup gdcmHeader
  * \brief   Retrieve the number of Bits Stored
@@ -1642,7 +1642,6 @@ int gdcmHeader::GetBitsStored(void) {
    return atoi(StrSize.c_str());
 }
 
-
 /**
  * \ingroup gdcmHeader
  * \brief   Retrieve the number of Samples Per Pixel
@@ -1656,6 +1655,7 @@ int gdcmHeader::GetSamplesPerPixel(void) {
       return 1; // Well, it's supposed to be mandatory ...
    return atoi(StrSize.c_str());
 }
+
 /**
  * \ingroup gdcmHeader
  * \brief   Return the size (in bytes) of a single pixel of data.
@@ -1878,6 +1878,10 @@ float gdcmHeader::GetZSpacing(void) {
       if (StrSliceThickness == "gdcm::Unfound")
          return 1.;
       else
+         // if no 'Spacing Between Slices' is found, 
+         // we assume slices join together
+         // (no overlapping, no interslice gap)
+         // if they don't, we're fucked up
          return atof(StrSliceThickness.c_str());  
    } else {
       return atof(StrSpacingBSlices.c_str());
@@ -1885,10 +1889,12 @@ float gdcmHeader::GetZSpacing(void) {
 }
 
 //
-//  Image Position Patient :
-// If not found (AVR-NEMA), we consider Slice Location (20,1041)
-// or Location (20,50) as the Z coordinate, 
-// 0. for all the coordinates if Slice Location not found
+// Image Position Patient (0020,0032):
+// If not found (ACR_NEMA) we try Image Position (0020,0030)
+// If not found (ACR-NEMA), we consider Slice Location (20,1041)
+//                                   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?
 /**
@@ -1899,7 +1905,9 @@ float gdcmHeader::GetZSpacing(void) {
 float gdcmHeader::GetXImagePosition(void) {
     float xImPos, yImPos, zImPos;
     // 0020,0032 : Image Position Patient
+    // 0020,0030 : Image Position (RET)
     // 0020,1041 : Slice Location
+   
     string StrImPos = GetPubElValByNumber(0x0020,0x0032);
 
     if (StrImPos == "gdcm::Unfound") {
@@ -1942,7 +1950,7 @@ float gdcmHeader::GetYImagePosition(void) {
           string StrSliceLoc = GetPubElValByNumber(0x0020,0x1041); // for *very* old ACR-NEMA images
           if (StrSliceLoc == "gdcm::Unfound") {
             dbg.Verbose(0, "gdcmHeader::GetYImagePosition: unfound Slice Location (0020,1041)");
-             // How to tell the caller nothing was found?
+            // How to tell the caller nothing was found?
           } 
        }  
        return 0.;
index 82b0e570db4aa6343f90ab9ca1d899cfb5dba58c..5cb02ac3ebb4f96ad0e092b8974388ed7e4ad1f7 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.14 2003/07/01 10:04:36 frog Exp $
+// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.15 2003/07/01 15:48:27 jpr Exp $
 
 #include <stdio.h>
 #include <ctype.h>   // For isspace
@@ -57,7 +57,7 @@ gdcmGlobal gdcmGlob;
 
 gdcmGlobal::gdcmGlobal(void) {
    if (VR || TS || Dicts)
-      dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts allready allocated");
+      dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
    VR = new gdcmVR();
    TS = new gdcmTS();
    Dicts = new gdcmDictSet();