Program: gdcm
Module: $RCSfile: gdcmDictSet.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:50:58 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2005/01/18 08:01:40 $
+ Version: $Revision: 1.53 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DictSet::~DictSet()
{
- // Remove dictionnaries
+ // Remove dictionaries
for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag)
{
Dict *entryToDelete = tag->second;
/**
* \brief Obtain from the GDCM_DICT_PATH environnement variable the
- * path to directory containing the dictionnaries. When
+ * path to directory containing the dictionaries. When
* the environnement variable is absent the path is defaulted
* to "../Dicts/".
- * @return path to directory containing the dictionnaries
+ * @return path to directory containing the dictionaries
*/
std::string DictSet::BuildDictPath()
{
Program: gdcm
Module: $RCSfile: gdcmDirList.cxx,v $
Language: C++
- Date: $Date: 2005/01/14 23:51:40 $
- Version: $Revision: 1.38 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.39 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
// Constructor / Destructor
/**
- * \ingroup DirList
* \brief Constructor
* @param dirName root directory name
* @param recursive whether we want to explore recursively or not
}
/**
- * \ingroup DirList
* \brief Destructor
*/
DirList::~DirList()
// Public
/**
- * \ingroup DirList
* \brief Print method
+ * @param os ostream to write to
*/
void DirList::Print(std::ostream &os)
{
// According to POSIX, the dirent structure contains a field char d_name[]
// of unspecified size, with at most NAME_MAX characters preceding the
- // terminating null character. Use of other fields will harm the porta-
+ // terminating null character. Use of other fields will harm the porta-
// bility of your programs.
struct stat buf;
Program: gdcm
Module: $RCSfile: gdcmDocEntry.cxx,v $
Language: C++
- Date: $Date: 2005/01/16 04:50:41 $
- Version: $Revision: 1.41 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.42 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup DocEntry
* \brief Constructor from a given DictEntry
* @param in Pointer to existing dictionary entry
*/
//-----------------------------------------------------------------------------
// Print
/**
- * \ingroup DocEntry
* \brief Prints the common part of ValEntry, BinEntry, SeqEntry
* @param os ostream we want to print in
*/
}
/**
- * \ingroup DocEntry
* \brief Writes the common part of any ValEntry, BinEntry, SeqEntry
* @param fp already open file pointer
* @param filetype type of the file to be written
// Public
/**
- * \ingroup DocEntry
* \brief Gets the full length of the elementary DocEntry (not only value
* length) depending on the VR.
*/
}
/**
- * \ingroup DocEntry
* \brief Copies all the attributes from an other DocEntry
+ * @param e entry to copy from
*/
void DocEntry::Copy (DocEntry *e)
{
ReadLength = e->ReadLength;
ImplicitVR = e->ImplicitVR;
Offset = e->Offset;
- // TODO : remove DocEntry SQDepth
}
/**
- * \ingroup DocEntry
* \brief tells us if entry is the last one of a 'no length' SequenceItem
* (fffe,e00d)
*/
return (GetGroup() == 0xfffe && GetElement() == 0xe00d);
}
/**
- * \ingroup DocEntry
* \brief tells us if entry is the last one of a 'no length' Sequence
* (fffe,e0dd)
*/
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/17 17:31:01 $
- Version: $Revision: 1.194 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.195 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool found0002 = false;
// for each zero-level Tag in the DCM Header
- DocEntry *entry;
-
- InitTraversal();
- entry = GetNextEntry();
+ DocEntry *entry = GetFirstEntry();
while(entry)
{
gr = entry->GetGroup();
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2005/01/17 16:52:21 $
- Version: $Revision: 1.88 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.89 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
FileType GetFileType();
std::string GetTransferSyntax();
-
- bool IsDicomV3();
-
+
RLEFramesInfo *GetRLEInfo() { return RLEInfo; }
JPEGFragmentsInfo *GetJPEGInfo() { return JPEGInfo; }
-// Dictionnaries
+// Dictionaries
virtual void PrintPubDict (std::ostream &os = std::cout);
virtual void PrintShaDict (std::ostream &os = std::cout);
/// Return the Transfer Syntax as a string
std::string GetTransferSyntaxName();
+ bool IsDicomV3();
+
protected:
// Methods
// Constructor and destructor are protected to forbid end user
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/01/16 04:50:41 $
- Version: $Revision: 1.42 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.43 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup ElementSet
* \brief Constructor from a given ElementSet
*/
//BOZ depthLevel is not usefull anymore
}
/**
- * \ingroup ElementSet
* \brief Canonical destructor.
*/
ElementSet::~ElementSet()
/**
* \brief Prints the Header Entries (Dicom Elements)
* from the H Table
+ * @param os ostream to write to
* @return
*/
void ElementSet::Print(std::ostream &os, std::string const & )
entry->SetPrintLevel(PrintLevel);
entry->Print(os);
- if ( SeqEntry *seqEntry = dynamic_cast<SeqEntry*>(entry) )
+ if ( /*SeqEntry *seqEntry = */dynamic_cast<SeqEntry*>(entry) )
{
- (void)seqEntry;
+ //(void)seqEntry;
// Avoid the newline for a sequence:
continue;
}
/**
* \brief Writes the Header Entries (Dicom Elements)
* from the H Table
+ * @param os ostream to write to
* @return
*/
void ElementSet::WriteContent(std::ofstream *fp, FileType filetype)
/**
* \brief Clear the hash table from given entry AND delete the entry.
* @param entryToRemove Entry to remove AND delete.
- * \warning Some problems when using under Windows... prefer the use of
- * Initialize / GetNext methods
*/
bool ElementSet::RemoveEntry( DocEntry *entryToRemove)
{
if( TagHT.count(key) == 1 )
{
TagHT.erase(key);
- gdcmVerboseMacro( "One element erased.");
+ //gdcmVerboseMacro( "One element erased.");
delete entryToRemove;
return true;
}
if( TagHT.count(key) == 1 )
{
TagHT.erase(key);
- gdcmVerboseMacro( "One element erased.");
+ //gdcmVerboseMacro( "One element erased.");
return true;
}
}
/**
- * \brief Initialise the visit of the Hash table (TagHT)
+ * \brief Get the first entry while visiting the DocEntrySet
+ * \return The first DocEntry if found, otherwhise NULL
*/
-void ElementSet::InitTraversal()
+DocEntry *ElementSet::GetFirstEntry()
{
ItTagHT = TagHT.begin();
+ return ItTagHT->second;
}
/**
- * \brief Get the next entry whil visiting the Hash table (TagHT)
+ * \brief Get the next entry while visiting the Hash table (TagHT)
+ * \note : meaningfull only if GetFirstEntry already called
* \return The next DocEntry if found, otherwhise NULL
*/
DocEntry *ElementSet::GetNextEntry()
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
- Date: $Date: 2005/01/16 04:50:41 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
void WriteContent(std::ofstream *fp, FileType filetype);
-
- /// Accessor to \ref TagHT
- // Do not expose this to user (public API) !
- // A test is using it thus put it in public (matt)
- //TagDocEntryHT const &GetTagHT() const { return TagHT; };
- void InitTraversal();
+ DocEntry *GetFirstEntry();
DocEntry *GetNextEntry();
protected:
Program: gdcm
Module: $RCSfile: gdcmException.cxx,v $
Language: C++
- Date: $Date: 2005/01/06 20:03:27 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Exception
/**
- * \ingroup Exception
* \brief constructor
- * @param f
- * @param msg
+ * @param f f
+ * @param msg msg
*/
Exception::Exception(const std::string &f, const std::string &msg) throw()
#ifdef __GNUC__
/**
- * \ingroup Exception
* \brief fatal
- * @param from
+ * @param from from
*/
void Exception::fatal(const char *from) throw() {
try
}
/**
- * \ingroup Exception
* \brief getName
* @return string
*/
}
/**
- * \ingroup Exception
* \brief Exception
*/
Exception::operator const char *() const throw() {
//-----------------------------------------------------------------------------
/**
- * \ingroup Exception
* \brief Exception::operator <<
+ * @param os ostream to write to
*/
std::ostream& operator<<(std::ostream &os, const Exception &e) {
try {
Program: gdcm
Module: $RCSfile: gdcmGlobal.cxx,v $
Language: C++
- Date: $Date: 2005/01/11 11:37:14 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
const std::string GDCM_UNREAD = "gdcm::UnRead";
/**
- * \ingroup Globals
* \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
*/
DictSet *Global::Dicts = (DictSet *)0;
/**
- * \ingroup Globals
* \brief Pointer to a hash table containing the 'Value Representations'.
*/
VR *Global::ValRes = (VR *)0;
/**
- * \ingroup Globals
* \brief Pointer to a hash table containing the Transfer Syntax codes
* and their english description
*/
TS *Global::TranSyn = (TS *)0;
/**
- * \ingroup Globals
* \brief Pointer to the hash table containing the Dicom Elements
* necessary to describe each part of a DICOMDIR
*/
DicomDirElement *Global::ddElem = (DicomDirElement *)0;
/**
- * \ingroup Globals
* \brief Global container
*/
Global Glob;
/**
- * \ingroup Global
* \brief constructor : populates the various H Tables
*/
Global::Global()
}
/**
- * \ingroup Global
* \brief canonical destructor
*/
Global::~Global()
delete ddElem;
}
/**
- * \ingroup Global
* \brief returns a pointer to the 'Value Representation Table'
*/
VR *Global::GetVR()
return ValRes;
}
/**
- * \ingroup Global
* \brief returns a pointer to the 'Transfer Syntax Table'
*/
TS *Global::GetTS()
return TranSyn;
}
/**
- * \ingroup Global
* \brief returns a pointer to Dictionaries Table
*/
DictSet *Global::GetDicts()
return Dicts;
}
/**
- * \ingroup Global
* \brief returns a pointer to the DicomDir related elements Table
*/
DicomDirElement *Global::GetDicomDirElements()
Program: gdcm
Module: $RCSfile: gdcmJpeg.cxx,v $
Language: C++
- Date: $Date: 2005/01/12 19:02:13 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/01/18 08:01:41 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
/**
- * \ingroup File
* \brief routine for JPEG decompression
* @param fp pointer to an already open file descriptor
* 8 significant bits per pixel
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2005/01/17 11:07:40 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2005/01/18 08:01:42 $
+ Version: $Revision: 1.53 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup SQItem
* \brief Constructor from a given SQItem
*/
SQItem::SQItem(int depthLevel )
}
/*
- * \ingroup SQItem
* \brief canonical Writer
*/
void SQItem::WriteContent(std::ofstream *fp, FileType filetype)
}
/**
- * \brief Get the next entry whil visiting the chained list
+ * \brief Get the next entry while visiting the chained list
* \return The next DocEntry if found, otherwhise NULL
*/
DocEntry *SQItem::GetNextEntry()
Program: gdcm
Module: $RCSfile: gdcmSeqEntry.cxx,v $
Language: C++
- Date: $Date: 2005/01/17 11:13:21 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2005/01/18 08:01:42 $
+ Version: $Revision: 1.45 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
- * \ingroup SeqEntry
* \brief Constructor from a given SeqEntry
*/
SeqEntry::SeqEntry( DictEntry *e )
Program: gdcm
Module: $RCSfile: gdcmSerieHeader.cxx,v $
Language: C++
- Date: $Date: 2005/01/14 22:20:11 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2005/01/18 08:01:42 $
+ 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
//-----------------------------------------------------------------------------
// Private
/**
- * \ingroup Header
* \brief sorts the images, according to their Patient Position
* We may order, considering :
* -# Image Number
}
/**
- * \ingroup Header
* \brief sorts the images, according to their Image Number
* @return false only if the header is bugged !
*/
/**
- * \ingroup Header
* \brief sorts the images, according to their File Name
* @return false only if the header is bugged !
*/
Program: gdcm
Module: $RCSfile: gdcmTS.cxx,v $
Language: C++
- Date: $Date: 2005/01/11 23:16:47 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2005/01/18 08:01:42 $
+ Version: $Revision: 1.37 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Print
/**
- * \ingroup VR
* \brief Print all
* @param os The output stream to be written to.
*/
Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2005/01/17 23:11:25 $
- Version: $Revision: 1.109 $
+ Date: $Date: 2005/01/18 08:01:42 $
+ Version: $Revision: 1.110 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
/**
- * \ingroup Globals
* \brief Provide a better 'c++' approach for sprintf
* For example c code is:
* sprintf(trash, "%04x|%04x", group , elem);
/**
- * \ingroup Globals
* \brief Because not available in C++ (?)
*/
void Util::Tokenize (const std::string &str,
}
/**
- * \ingroup Globals
* \brief Because not available in C++ (?)
* Counts the number of occurences of a substring within a string
*/
}
/**
- * \ingroup Globals
* \brief Weed out a string from the non-printable characters (in order
* to avoid corrupting the terminal of invocation when printing)
* @param s string to remove non printable characters from
}
/**
- * \ingroup Globals
* \brief Add a SEPARATOR to the end of the name is necessary
* @param pathname file/directory name to normalize
*/
}
/**
- * \ingroup Globals
* \brief Get the (directory) path from a full path file name
* @param fullName file/directory name to extract Path from
*/
}
/**
- * \ingroup Util
* \brief Get the (last) name of a full path file name
* @param fullName file/directory name to extract end name from
*/
}
/**
- * \ingroup Util
* \brief Get the current date of the system in a dicom string
*/
std::string Util::GetCurrentDate()
}
/**
- * \ingroup Util
* \brief Get the current time of the system in a dicom string
*/
std::string Util::GetCurrentTime()
}
/**
- * \ingroup Util
* \brief Create a /DICOM/ string:
* It should a of even lenght (no odd length ever)
* It can contain as many (if you are reading this from your
}
/**
- * \ingroup Util
* \brief Safely compare two Dicom String:
* - Both string should be of even lenght
* - We allow padding of even lenght string by either a null
/**
- * \ingroup Util
* \brief tells us if the processor we are working with is BigEndian or not
*/
bool Util::IsCurrentProcessorBigEndian()
#endif //__sun
}
+/**
+ * \brief Gets the M.A.C. adress of the machine writting the DICOM image
+ */
std::string Util::GetMACAddress()
{
// This code is the result of a long internet search to find something
}
/**
- * \ingroup Util
* \brief Return the IP adress of the machine writting the DICOM image
*/
std::string Util::GetIPAddress()
}
/**
- * \ingroup Util
* \brief Creates a new UID. As stipulate in the DICOM ref
* each time a DICOM image is create it should have
* a unique identifier (URI)
return radical;
}
+/**
+ * \brief
+ * @param os ostream to write to
+ * @param val val
+ */
template <class T>
std::ostream &binary_write(std::ostream &os, const T &val)
{
return os.write(reinterpret_cast<const char*>(&val), sizeof val);
}
+/**
+ * \brief binary_write binary_write
+ * @param os ostream to write to
+ * @param val val
+ */
std::ostream &binary_write(std::ostream &os, const uint16_t &val)
{
#ifdef GDCM_WORDS_BIGENDIAN
#endif //GDCM_WORDS_BIGENDIAN
}
+/**
+ * \brief binary_write binary_write
+ * @param os ostream to write to
+ * @param val val
+ */
std::ostream &binary_write(std::ostream &os, const uint32_t &val)
{
#ifdef GDCM_WORDS_BIGENDIAN
#endif //GDCM_WORDS_BIGENDIAN
}
+/**
+ * \brief binary_write binary_write
+ * @param os ostream to write to
+ * @param val val
+ */
std::ostream &binary_write(std::ostream &os, const char *val)
{
return os.write(val, strlen(val));
}
+/**
+ * \brief
+ * @param os ostream to write to
+ * @param val val
+ */
std::ostream &binary_write(std::ostream &os, std::string const &val)
{
return os.write(val.c_str(), val.size());