now contains all the gdcmGlobal related code.
* minor coding style and doxygenation changes.
+2004-03-27 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
+ * src/gdcmUtil.[cxx|h] split in two. Additional file gdcmGlobal.[cxx|h]
+ now contains all the gdcmGlobal related code.
+ * minor coding style and doxygenation changes.
+
2004-03-26 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
* src/gdcmUtil.[cxx|h] split in two. Additional file gdcmDebug.[cxx|h]
now contains all the Debug related code.
#include "gdcmHeaderHelper.h"
#include "gdcmFile.h"
#include "gdcmUtil.h"
+#include "gdcmGlobal.h"
#include "gdcmObject.h"
#include "gdcmDicomDir.h"
#include "gdcmDicomDirElement.h"
%include "gdcmHeaderHelper.h"
%include "gdcmFile.h"
%include "gdcmUtil.h"
+%include "gdcmGlobal.h"
%include "gdcmObject.h"
%include "gdcmDicomDir.h"
%include "gdcmDicomDirElement.h"
gdcmDirList.cxx \
gdcmException.cxx \
gdcmFile.cxx \
+ gdcmGlobal.cxx \
gdcmHeader.cxx \
gdcmHeaderEntry.cxx \
gdcmHeaderHelper.cxx \
gdcmDirList.h \
gdcmException.h \
gdcmFile.h \
+ gdcmGlobal.h \
gdcm.h \
gdcmHeaderEntry.h \
gdcmHeader.h \
#include "gdcmDirList.h"
#include "gdcmUtil.h"
#include "gdcmDebug.h"
+#include "gdcmGlobal.h"
//-----------------------------------------------------------------------------
// For full DICOMDIR description, see:
// Constructor / Destructor
/**
- * \ingroup gdcmDicomDir
* \brief Constructor Parses recursively the directory and creates the DicomDir
- * or uses an already built DICOMDIR, depending on 'parseDir' value
+ * or uses an already built DICOMDIR, depending on 'parseDir' value.
* @param FileName name
- - of the root directory (parseDir = true)
+ * - of the root directory (parseDir = true)
* - of the DICOMDIR (parseDir = false)
* @param parseDir boolean
* - true if user passed an entry point
itImage = ((*itSerie)->GetDicomDirImages()).begin();
while (itImage != (*itSerie)->GetDicomDirImages().end() ) {
(*itImage)->ResetBoundaries(1);
- ++itImage;
- }
- ++itSerie;
+ ++itImage;
+ }
+ ++itSerie;
}
- ++itStudy;
+ ++itStudy;
}
++itPatient;
}
entry->SetValue(it->value);
if(dictEntry->GetGroup()==0xfffe)
- {
- entry->SetLength(entry->GetValue().length());
- }
+ {
+ entry->SetLength(entry->GetValue().length());
+ }
else if( (dictEntry->GetVR()=="UL") || (dictEntry->GetVR()=="SL") )
{
entry->SetLength(4);
#include "gdcmDicomDirElement.h"
#include "gdcmUtil.h"
#include "gdcmDebug.h"
+#include "gdcmDictSet.h"
#ifndef PUB_DICT_PATH
# define PUB_DICT_PATH "../Dicts/"
//-----------------------------------------------------------------------------
#include "gdcmDicomDirPatient.h"
#include "gdcmDicomDirElement.h"
-#include "gdcmUtil.h"
+#include "gdcmGlobal.h"
//-----------------------------------------------------------------------------
// Constructor / Destructor
//-----------------------------------------------------------------------------
#include "gdcmDicomDirSerie.h"
#include "gdcmDicomDirElement.h"
-#include "gdcmUtil.h"
+#include "gdcmGlobal.h"
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup gdcmDicomDirSerie
* \brief Constructor
* @param begin iterator (inside the gdcmParser chained list)
* on the first Header Entry (i.e Dicom Element)
*/
gdcmDicomDirSerie::gdcmDicomDirSerie(ListTag::iterator begin,
ListTag::iterator end,
- TagHeaderEntryHT *ptagHT,
- ListTag *plistEntries ):
+ TagHeaderEntryHT *ptagHT,
+ ListTag *plistEntries ):
gdcmObject(begin,end,ptagHT,plistEntries)
{
}
/**
- * \ingroup gdcmDicomDirSerie
* \brief Canonical destructor.
*/
gdcmDicomDirSerie::~gdcmDicomDirSerie()
//-----------------------------------------------------------------------------
// Print
/**
- * \ingroup gdcmDicomDirSerie
* \brief Prints the Object
* @return
*/
//-----------------------------------------------------------------------------
// Public
/**
- * \ingroup gdcmDicomSerie
* \brief adds a new Image to a partially created DICOMDIR
*/
gdcmDicomDirImage * gdcmDicomDirSerie::NewImage(void) {
//-----------------------------------------------------------------------------
#include "gdcmDicomDirStudy.h"
#include "gdcmDicomDirElement.h"
-#include "gdcmUtil.h"
+#include "gdcmGlobal.h"
//-----------------------------------------------------------------------------
// Constructor / Destructor
*/
gdcmDicomDirStudy::gdcmDicomDirStudy(ListTag::iterator begin,
ListTag::iterator end,
- TagHeaderEntryHT *ptagHT,
- ListTag *plistEntries):
+ TagHeaderEntryHT *ptagHT,
+ ListTag *plistEntries):
gdcmObject(begin,end,ptagHT,plistEntries)
{
}
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup gdcmDict
* \brief Construtor
* @param FileName from which to build the dictionary.
*/
name = buff;
gdcmDictEntry * newEntry = new gdcmDictEntry(group, element,
- vr, fourth, name);
+ vr, fourth, name);
AddNewEntry(newEntry);
}
from.close();
}
/**
- * \ingroup gdcmDict
* \brief Destructor
*/
gdcmDict::~gdcmDict() {
}
/**
- * \ingroup gdcmDict
* \brief Print all the dictionary entries contained in this dictionary.
* Entries will be sorted by tag i.e. the couple (group, element).
* @param os The output stream to be written to.
}
/**
- * \ingroup gdcmDict
* \brief Print all the dictionary entries contained in this dictionary.
* Entries will be sorted by the name of the dictionary entries.
* \warning AVOID USING IT : the name IS NOT an identifier;
{
TagKey key;
key = NewEntry->GetKey();
-
+
if(KeyHt.count(key) == 1)
{
dbg.Verbose(1, "gdcmDict::AddNewEntry already present", key.c_str());
*/
std::string vr;
- // CLEANME: find the official dicom name for this field !
/**
- * \ingroup gdcmDictEntry
- * \brief Fourth field containing some semantics
- * (Group Name abbr.)
- * DON'T USER ANY LONGER !
- */
+ * \brief AVOID using the following fourth field at all costs.
+ *
+ * They are at leat two good reasons for NOT using fourth:
+ * - the main reason is that it is NOT part of the 'official'
+ * Dicom Dictionnary.
+ * - a second reason is that it is not defined for all the groups.
+ * .
+ * Still it provides some semantics as group name abbreviation that
+ * can prove of some help when organizing things in an interface.
+ * For the time being we keep it in gdcm but it migth be removed in
+ * future releases it proves to be source of confusion.
+ * Here is a small dictionary we encountered in "nature":
+ * - CMD Command
+ * - META Meta Information
+ * - DIR Directory
+ * - ID ???
+ * - PAT Patient
+ * - ACQ Acquisition
+ * - REL Related
+ * - IMG Image
+ * - SDY Study
+ * - VIS Visit
+ * - WAV Waveform
+ * - PRC ???
+ * - DEV Device
+ * - NMI Nuclear Medicine
+ * - MED ???
+ * - BFS Basic Film Session
+ * - BFB Basic Film Box
+ * - BIB Basic Image Box
+ * - BAB
+ * - IOB
+ * - PJ
+ * - PRINTER
+ * - RT Radio Therapy
+ * - DVH
+ * - SSET
+ * - RES Results
+ * - CRV Curve
+ * - OLY Overlays
+ * - PXL Pixels
+ * - DL Delimiters
+ * .
+ *
+ * Other usefull abreviations used for Radiographic view associated with
+ * Patient Position (0018,5100):
+ * - AP = Anterior/Posterior
+ * - PA = Posterior/Anterior
+ * - LL = Left Lateral
+ * - RL = Right Lateral
+ * - RLD = Right Lateral Decubitus
+ * - LLD = Left Lateral Decubitus
+ * - RLO = Right Lateral Oblique
+ * - LLO = Left Lateral Oblique
+ * .
+ */
std::string fourth;
+
/// e.g. "Patient's Name"
std::string name;
- /// Redundant with (group, element) but we add it
- /// on efficiency purposes.
- /**
- * \ingroup gdcmDictEntry
- * \brief Redundant with (group, element) but we add it
- * on efficiency purposes.
- */ TagKey key;
+
+ /// Redundant with (group, element) but we add it on efficiency purposes.
+ TagKey key;
// DCMTK has many fields for handling a DictEntry (see below). What are the
// relevant ones for gdcmlib ?
--- /dev/null
+// gdcmGlobal.cxx
+//-----------------------------------------------------------------------------
+#include "gdcmGlobal.h"
+#include "gdcmDebug.h"
+#include <stdio.h>
+#include <ctype.h> // For isspace
+#include <string.h> // CLEANME: could this be only string ? Related to Win32 ?
+
+/**
+ * \ingroup Globals
+ * \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
+ */
+gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
+
+/**
+ * \ingroup Globals
+ * \brief Pointer to a hash table containing the 'Value Representations'.
+ */
+gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
+
+/**
+ * \ingroup Globals
+ * \brief Pointer to a hash table containing the Transfer Syntax codes
+ * and their english description
+ */
+gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
+
+/**
+ * \ingroup Globals
+ * \brief Pointer to the hash table containing the Dicom Elements
+ * necessary to describe each part of a DICOMDIR
+ */
+gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
+
+/**
+ * \ingroup Globals
+ * \brief Global container
+ */
+gdcmGlobal gdcmGlob;
+
+/**
+ * \ingroup gdcmGlobal
+ * \brief constructor : populates the various H Tables
+ */
+gdcmGlobal::gdcmGlobal(void) {
+ if (VR || TS || Dicts || ddElem)
+ dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
+ Dicts = new gdcmDictSet();
+ VR = new gdcmVR();
+ TS = new gdcmTS();
+ ddElem = new gdcmDicomDirElement();
+}
+
+/**
+ * \ingroup gdcmGlobal
+ * \brief canonical destructor
+ */
+gdcmGlobal::~gdcmGlobal() {
+ delete Dicts;
+ delete VR;
+ delete TS;
+ delete ddElem;
+}
+/**
+ * \ingroup gdcmGlobal
+ * \brief returns a pointer to the 'Value Representation Table'
+ */
+gdcmVR *gdcmGlobal::GetVR(void) {
+ return VR;
+}
+/**
+ * \ingroup gdcmGlobal
+ * \brief returns a pointer to the 'Transfert Syntax Table'
+ */
+gdcmTS *gdcmGlobal::GetTS(void) {
+ return TS;
+}
+/**
+ * \ingroup gdcmGlobal
+ * \brief returns a pointer to Dictionaries Table
+ */
+gdcmDictSet *gdcmGlobal::GetDicts(void) {
+ return Dicts;
+}
+/**
+ * \ingroup gdcmGlobal
+ * \brief returns a pointer to the DicomDir related elements Table
+ */
+gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) {
+ return ddElem;
+}
--- /dev/null
+// gdcmGlobal.h
+//-----------------------------------------------------------------------------
+#ifndef GDCMGLOBAL_H
+#define GDCMGLOBAL_H
+
+#include "gdcmVR.h"
+#include "gdcmTS.h"
+#include "gdcmDictSet.h"
+#include "gdcmDicomDirElement.h"
+
+//-----------------------------------------------------------------------------
+/**
+ * \brief This class contains all globals elements that might be
+ * instanciated only once (singletons).
+ */
+class GDCM_EXPORT gdcmGlobal {
+public:
+ gdcmGlobal(void);
+ ~gdcmGlobal();
+
+ static gdcmDictSet *GetDicts(void);
+ static gdcmVR *GetVR(void);
+ static gdcmTS *GetTS(void);
+ static gdcmDicomDirElement *GetDicomDirElements(void);
+
+private:
+ static gdcmDictSet *Dicts;
+ static gdcmVR *VR;
+ static gdcmTS *TS;
+ static gdcmDicomDirElement *ddElem;
+};
+
+//-----------------------------------------------------------------------------
+#endif
#include <vector>
#include "gdcmHeader.h"
+#include "gdcmGlobal.h"
#include "gdcmUtil.h"
#include "gdcmDebug.h"
#include "gdcmTS.h"
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup gdcmHeader
* \brief Constructor
- * @param InFilename name of the file whose header we want to analyze
- * @param exception_on_error whether we want to throw an exception or not
- * @param enable_sequences = true to allow the header
- * to be parsed *inside* the SeQuences,
- * when they have an actual length
- * @param ignore_shadow = true if user wants to skip shadow groups
- * during parsing, to save memory space
+ * @param InFilename name of the file whose header we want to analyze
+ * @param exception_on_error whether we want to throw an exception or not
+ * @param enable_sequences = true to allow the header
+ * to be parsed *inside* the SeQuences, when they have an actual length
+ * @param ignore_shadow = true if user wants to skip shadow groups
+ * during parsing, to save memory space
*/
gdcmHeader::gdcmHeader(const char *InFilename,
bool exception_on_error,
bool enable_sequences,
- bool ignore_shadow):
+ bool ignore_shadow):
gdcmParser(InFilename,exception_on_error,enable_sequences,ignore_shadow)
{
NumPixel = 0x1010;
else
NumPixel = 0x0010;
-
+
TagKey key = gdcmDictEntry::TranslateToKey(GrPixel, NumPixel);
countGrPixel = GetEntry().count(key);
}
/**
- * \ingroup gdcmHeader
* \brief Constructor
- * @param exception_on_error whether we want to throw an exception or not
+ * @param exception_on_error whether we want to throw an exception or not
*/
gdcmHeader::gdcmHeader(bool exception_on_error) :
gdcmParser(exception_on_error)
//-----------------------------------------------------------------------------
/**
- * \ingroup gdcmHeader
* \brief
* The purpose of an instance of gdcmHeader is to act as a container of
* all the DICOM elements and their corresponding values (and
gdcmHeader(const char *filename,
bool exception_on_error = false,
bool enable_sequences = false,
- bool skip_shadow = false);
-
+ bool skip_shadow = false);
+
virtual ~gdcmHeader();
// Standard values and informations contained in the header
bool IsDicomV3(void);
// Some heuristic based accessors, end user intended
- // (to be move to gdcmHeaderHelper?)
+ // (to be moved to gdcmHeaderHelper?)
int GetXSize(void);
int GetYSize(void);
int GetZSize(void);
// TODO Swig int SetPubDict(std::string filename);
// System access
-/**
- * \ingroup gdcmHeader
- * \brief the Header Entry Group Number of the 'Pixel Group'
- * is not allways 0x7fe0
- * @return GrPixel
- */
+ /**
+ * \brief the Header Entry Group Number of the 'Pixel Group'
+ * is not allways 0x7fe0
+ * @return GrPixel
+ */
guint16 GetGrPixel(void) {return GrPixel;}
-/**
- * \ingroup gdcmHeader
- * \brief the Header Entry Element Number of the 'Pixel Element'
- * is not allways 0x0010
- * @return NumPixel
- */
- guint16 GetNumPixel(void) {return NumPixel;}
+
+ /// Accessor to \ref gdcmParser::NumPixel
+ guint16 GetNumPixel(void) {return NumPixel;}
// Entry
inline virtual void UpdateShaEntries(void)
{ gdcmParser::UpdateShaEntries(); }
-// Read (used in gdcmFile)
+ /// Read (used in gdcmFile)
void SetImageDataSize(size_t ExpectedSize);
bool operator<(gdcmHeader &header);
//
#include "gdcmHeaderEntry.h"
#include "gdcmTS.h"
+#include "gdcmGlobal.h"
#include "gdcmUtil.h"
#ifdef GDCM_NO_ANSI_STRING_STREAM
* @param in Pointer to existing dictionary entry
*/
gdcmHeaderEntry::gdcmHeaderEntry(gdcmDictEntry* in) {
- ImplicitVR = false;
- voidArea = NULL; // unsecure memory area to hold 'non string' values
- entry = in;
+ ImplicitVR = false;
+ voidArea = NULL; // unsecure memory area to hold 'non string' values
+ entry = in;
}
//-----------------------------------------------------------------------------
if (printLevel>=1) {
s.setf(std::ios::left);
- s << std::setw(66-GetName().length()) << " ";
+ s << std::setw(66-GetName().length()) << " ";
}
s << "[" << GetName()<< "]";
if ( (vr == "UL") || (vr == "US") || (vr == "SL") || (vr == "SS") ) {
if (v == "4294967295") // to avoid troubles in convertion
sprintf (st," x(ffffffff)");
- else
+ else
sprintf(st," x(%x)",(unsigned long)atof(v.c_str()));
s << st;
}
// gdcmObject.cxx
//-----------------------------------------------------------------------------
#include "gdcmObject.h"
-#include "gdcmUtil.h"
+#include "gdcmGlobal.h"
#include "gdcmDebug.h"
//-----------------------------------------------------------------------------
for(i=beginObj;;++i) {
(*i)->SetPrintLevel(printLevel);
(*i)->Print(os);
- if (i == endObj) break;
+ if (i == endObj) break;
}
}
}
# include <iomanip>
#include "gdcmParser.h"
+#include "gdcmGlobal.h"
#include "gdcmUtil.h"
#include "gdcmDebug.h"
#define UI1_2_840_10008_1_2_2 "1.2.840.10008.1.2.2"
#define UI1_2_840_10008_1_2_1_99 "1.2.840.10008.1.2.1.99"
- // Fourth semantics:
- //
- // ---> Warning : This fourth field is NOT part
- // of the 'official' Dicom Dictionnary
- // and should NOT be used.
- // (Not defined for all the groups
- // may be removed in a future release)
- //
- // CMD Command
- // META Meta Information
- // DIR Directory
- // ID
- // PAT Patient
- // ACQ Acquisition
- // REL Related
- // IMG Image
- // SDY Study
- // VIS Visit
- // WAV Waveform
- // PRC
- // DEV Device
- // NMI Nuclear Medicine
- // MED
- // BFS Basic Film Session
- // BFB Basic Film Box
- // BIB Basic Image Box
- // BAB
- // IOB
- // PJ
- // PRINTER
- // RT Radio Therapy
- // DVH
- // SSET
- // RES Results
- // CRV Curve
- // OLY Overlays
- // PXL Pixels
- // DL Delimiters
- //
-
- // Other usefull abreviations :
- // Radiographic view associated with Patient Position (0018,5100).
- // Defined Terms:
- //
- // AP = Anterior/Posterior
- // PA = Posterior/Anterior
- // LL = Left Lateral
- // RL = Right Lateral
- // RLD = Right Lateral Decubitus
- // LLD = Left Lateral Decubitus
- // RLO = Right Lateral Oblique
- // LLO = Left Lateral Oblique
-
//-----------------------------------------------------------------------------
// Refer to gdcmParser::CheckSwap()
const unsigned int gdcmParser::HEADER_LENGTH_TO_READ = 256;
// Constructor / Destructor
/**
- * \ingroup gdcmParser
- * \brief constructor
+ * \brief constructor
* @param inFilename
* @param exception_on_error whether we throw an exception or not
* @param enable_sequences = true to allow the header
* to be parsed *inside* the SeQuences,
* when they have an actual length
- * @param ignore_shadow to allow skipping the shadow elements,
- * to save memory space.
- * \warning The TRUE value for this param has to be used
- * with a FALSE value for the 'enable_sequence' param.
- * ('public elements' may be embedded in 'shadow Sequences')
+ * @param ignore_shadow to allow skipping the shadow elements,
+ * to save memory space.
+ * \warning The TRUE value for this param has to be used
+ * with a FALSE value for the 'enable_sequence' param.
+ * ('public elements' may be embedded in 'shadow Sequences')
*/
gdcmParser::gdcmParser(const char *inFilename,
bool exception_on_error,
bool enable_sequences,
- bool ignore_shadow) {
+ bool ignore_shadow) {
enableSequences=enable_sequences;
ignoreShadow =ignore_shadow;
//-----------------------------------------------------------------------------
/**
- * \ingroup gdcmParser
* \brief used by both gdcmHeader and gdcmDicomDir
*/
class GDCM_EXPORT gdcmParser
*/
guint16 GrPixel;
- /**
- * \brief For some ACR-NEMA images, it's *not* 0010 ...
- */
+ /// In some cases (e.g. for some ACR-NEMA images) the Header Entry Element
+ /// Number of the 'Pixel Element' is *not* found at 0x0010. In order to
+ /// make things easier the parser shall store the proper value in
+ /// NumPixel to provide a unique access facility. See also
+ /// \ref gdcmHeader::gdcmHeader
guint16 NumPixel;
/**
* \brief some files may contain icons; GrPixel,NumPixel appears several times
#include <ctype.h> // For isspace
#include <string.h> // CLEANME: could this be only string ? Related to Win32 ?
-/**
- * \ingroup Globals
- * \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
- */
-gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
-
-/**
- * \ingroup Globals
- * \brief Pointer to a hash table containing the 'Value Representations'.
- */
-gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
-
-/**
- * \ingroup Globals
- * \brief Pointer to a hash table containing the Transfer Syntax codes
- * and their english description
- */
-gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
-
-/**
- * \ingroup Globals
- * \brief Pointer to the hash table containing the Dicom Elements
- * necessary to describe each part of a DICOMDIR
- */
-gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
-
-/**
- * \ingroup Globals
- * \brief Global container
- */
-gdcmGlobal gdcmGlob;
-
-/**
- * \ingroup gdcmGlobal
- * \brief constructor : populates the various H Tables
- */
-gdcmGlobal::gdcmGlobal(void) {
- if (VR || TS || Dicts || ddElem)
- dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
- Dicts = new gdcmDictSet();
- VR = new gdcmVR();
- TS = new gdcmTS();
- ddElem = new gdcmDicomDirElement();
-}
-
-/**
- * \ingroup gdcmGlobal
- * \brief canonical destructor
- */
-gdcmGlobal::~gdcmGlobal() {
- delete Dicts;
- delete VR;
- delete TS;
- delete ddElem;
-}
-/**
- * \ingroup gdcmGlobal
- * \brief returns a pointer to the 'Value Representation Table'
- */
-gdcmVR *gdcmGlobal::GetVR(void) {
- return VR;
-}
-/**
- * \ingroup gdcmGlobal
- * \brief returns a pointer to the 'Transfert Syntax Table'
- */
-gdcmTS *gdcmGlobal::GetTS(void) {
- return TS;
-}
-/**
- * \ingroup gdcmGlobal
- * \brief returns a pointer to Dictionaries Table
- */
-gdcmDictSet *gdcmGlobal::GetDicts(void) {
- return Dicts;
-}
-/**
- * \ingroup gdcmGlobal
- * \brief returns a pointer to the DicomDir related elements Table
- */
-gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) {
- return ddElem;
-}
-
-/**
- * \defgroup Globals Utility functions
- * \brief Here are some utility functions, belonging to NO class,
- * dealing with strings, file names... that can be called
- * from anywhere by whomsoever they can help.
- */
-
-
/**
* \ingroup Globals
* \brief Because is not yet available in g++2.96
#ifndef GDCMUTIL_H
#define GDCMUTIL_H
-#include "gdcmCommon.h"
-#include "gdcmVR.h"
-#include "gdcmTS.h"
-#include "gdcmDictSet.h"
-#include "gdcmDicomDirElement.h"
#include <vector>
#include <string>
-//-----------------------------------------------------------------------------
/**
- * \ingroup gdcmGlobal
- * \brief This class contains all globals elements that might be
- * instanciated only once (singletons).
+ * \defgroup Globals Utility functions
+ * \brief Here are some utility functions, belonging to NO class,
+ * dealing with strings, file names... that can be called
+ * from anywhere by whomsoever they can help.
*/
-class GDCM_EXPORT gdcmGlobal {
-public:
- gdcmGlobal(void);
- ~gdcmGlobal();
-
- static gdcmDictSet *GetDicts(void);
- static gdcmVR *GetVR(void);
- static gdcmTS *GetTS(void);
- static gdcmDicomDirElement *GetDicomDirElements(void);
-
-private:
- static gdcmDictSet *Dicts;
- static gdcmVR *VR;
- static gdcmTS *TS;
- static gdcmDicomDirElement *ddElem;
-};
//-----------------------------------------------------------------------------
std::istream & eatwhite(std::istream & is);
void NormalizePath(std::string &name);
std::string GetPath(std::string &fullName);
std::string GetName(std::string &fullName);
+//-----------------------------------------------------------------------------
#endif
#include "gdcmVR.h"
#include "gdcmUtil.h"
+#include "gdcmDictSet.h"
#include "gdcmDebug.h"
#ifndef PUB_DICT_PATH
#define DICT_VR "dicomVR.dic"
//-----------------------------------------------------------------------------
-// Constructor / Destructor
+/**
+ * \brief Constructor
+ */
gdcmVR::gdcmVR(void)
{
std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_VR);
from.close();
}
+/**
+ * \brief Destructor
+ */
gdcmVR::~gdcmVR() {
vr.clear();
}
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\gdcmGlobal.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\gdcmHeader.cxx\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\gdcmGlobal.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\gdcmHeader.h\r
# End Source File\r
# Begin Source File\r