From cbdf7d814e2c43c37dff624581dd77ac178e9ce7 Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 1 Jul 2003 15:48:27 +0000 Subject: [PATCH] mistyping corrected --- src/gdcmDict.cxx | 4 ++-- src/gdcmDictSet.cxx | 2 +- src/gdcmDictSet.h | 2 +- src/gdcmFile.h | 2 +- src/gdcmHeader.cxx | 52 ++++++++++++++++++++++++++------------------- src/gdcmUtil.cxx | 4 ++-- 6 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index acd88f89..2b8dff9e 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -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; diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 5262e30d..d75a14e2 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -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 diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index 56fcc33d..f71a1eb8 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -14,7 +14,7 @@ typedef std::map 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). */ diff --git a/src/gdcmFile.h b/src/gdcmFile.h index bf7142b3..e9bf7081 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -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); diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index c03e3419..b280fd62 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -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 #include @@ -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.; diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 82b0e570..5cb02ac3 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -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 #include // 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(); -- 2.48.1