Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/20 11:26:17 $
- Version: $Revision: 1.202 $
+ Date: $Date: 2005/01/20 11:37:37 $
+ Version: $Revision: 1.203 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return false;
}*/
-/**
- * \brief retrieves a Dicom Element using (group, element)
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
- * @return
- */
-DocEntry *Document::GetDocEntry(uint16_t group, uint16_t elem)
-{
- TagKey key = DictEntry::TranslateToKey(group, elem);
- if ( !TagHT.count(key))
- {
- return NULL;
- }
- return TagHT.find(key)->second;
-}
-
-/**
- * \brief Same as \ref Document::GetDocEntry except it only
- * returns a result when the corresponding entry is of type
- * ValEntry.
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
- * @return When present, the corresponding ValEntry.
- */
-ValEntry *Document::GetValEntry(uint16_t group, uint16_t elem)
-{
- DocEntry *currentEntry = GetDocEntry(group, elem);
- if ( !currentEntry )
- {
- return 0;
- }
- if ( ValEntry *entry = dynamic_cast<ValEntry*>(currentEntry) )
- {
- return entry;
- }
- gdcmVerboseMacro( "Unfound ValEntry.");
-
- return 0;
-}
-
-/**
- * \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
- * @return When present, the corresponding BinEntry.
- */
-BinEntry *Document::GetBinEntry(uint16_t group, uint16_t elem)
-{
- DocEntry *currentEntry = GetDocEntry(group, elem);
- if ( !currentEntry )
- {
- return 0;
- }
- if ( BinEntry *entry = dynamic_cast<BinEntry*>(currentEntry) )
- {
- return entry;
- }
- gdcmVerboseMacro( "Unfound BinEntry.");
-
- return 0;
-}
-
-/**
- * \brief Same as \ref Document::GetDocEntry except it only
- * returns a result when the corresponding entry is of type
- * SeqEntry.
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
- * @return When present, the corresponding SeqEntry.
- */
-SeqEntry *Document::GetSeqEntry(uint16_t group, uint16_t elem)
-{
- DocEntry *currentEntry = GetDocEntry(group, elem);
- if ( !currentEntry )
- {
- return 0;
- }
- if ( SeqEntry *entry = dynamic_cast<SeqEntry*>(currentEntry) )
- {
- return entry;
- }
- gdcmVerboseMacro( "Unfound SeqEntry.");
-
- return 0;
-}
-
/**
* \brief Loads the element while preserving the current
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2005/01/20 11:07:07 $
- Version: $Revision: 1.93 $
+ Date: $Date: 2005/01/20 11:37:37 $
+ Version: $Revision: 1.94 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Content entries
+// Oops ! Python is gonna cry :
+// 4 methods with same name and different parameters ...
+// Only C++ is aware!
+
virtual bool SetEntry(std::string const &content,
- uint16_t group, uint16_t element);
+ uint16_t group, uint16_t elem);
virtual bool SetEntry(uint8_t *content, int lgth,
- uint16_t group, uint16_t element);
+ uint16_t group, uint16_t elem);
virtual bool SetEntry(std::string const &content, ValEntry *entry);
virtual bool SetEntry(uint8_t *content, int lgth, BinEntry *entry);
virtual std::string GetEntryVR(uint16_t group, uint16_t elem);
virtual int GetEntryLength(uint16_t group, uint16_t elem);
- DocEntry *GetDocEntry(uint16_t group, uint16_t element);
- ValEntry *GetValEntry(uint16_t group, uint16_t element);
- BinEntry *GetBinEntry(uint16_t group, uint16_t element);
- SeqEntry *GetSeqEntry(uint16_t group, uint16_t element);
-
ValEntry *ReplaceOrCreate(std::string const &value,
uint16_t group, uint16_t elem,
TagName const &vr = GDCM_UNKNOWN);
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 15:24:28 $
- Version: $Revision: 1.46 $
+ Date: $Date: 2005/01/20 11:37:37 $
+ 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
}
}
+
+/**
+ * \brief retrieves a Dicom Element using (group, element)
+ * @param group Group number of the searched Dicom Element
+ * @param elem Element number of the searched Dicom Element
+ * @return
+ */
+DocEntry *ElementSet::GetDocEntry(uint16_t group, uint16_t elem)
+{
+ TagKey key = DictEntry::TranslateToKey(group, elem);
+ if ( !TagHT.count(key))
+ {
+ return NULL;
+ }
+ return TagHT.find(key)->second;
+}
+
+/**
+ * \brief Same as \ref Document::GetDocEntry except it only
+ * returns a result when the corresponding entry is of type
+ * ValEntry.
+ * @param group Group number of the searched Dicom Element
+ * @param elem Element number of the searched Dicom Element
+ * @return When present, the corresponding ValEntry.
+ */
+ValEntry *ElementSet::GetValEntry(uint16_t group, uint16_t elem)
+{
+ DocEntry *currentEntry = GetDocEntry(group, elem);
+ if ( !currentEntry )
+ {
+ return 0;
+ }
+ if ( ValEntry *entry = dynamic_cast<ValEntry*>(currentEntry) )
+ {
+ return entry;
+ }
+ gdcmVerboseMacro( "Unfound ValEntry.");
+
+ return 0;
+}
+
+/**
+ * \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
+ * @return When present, the corresponding BinEntry.
+ */
+BinEntry *ElementSet::GetBinEntry(uint16_t group, uint16_t elem)
+{
+ DocEntry *currentEntry = GetDocEntry(group, elem);
+ if ( !currentEntry )
+ {
+ return 0;
+ }
+ if ( BinEntry *entry = dynamic_cast<BinEntry*>(currentEntry) )
+ {
+ return entry;
+ }
+ gdcmVerboseMacro( "Unfound BinEntry.");
+
+ return 0;
+}
+
+/**
+ * \brief Same as \ref Document::GetDocEntry except it only
+ * returns a result when the corresponding entry is of type
+ * SeqEntry.
+ * @param group Group number of the searched Dicom Element
+ * @param elem Element number of the searched Dicom Element
+ * @return When present, the corresponding SeqEntry.
+ */
+SeqEntry *ElementSet::GetSeqEntry(uint16_t group, uint16_t elem)
+{
+ DocEntry *currentEntry = GetDocEntry(group, elem);
+ if ( !currentEntry )
+ {
+ return 0;
+ }
+ if ( SeqEntry *entry = dynamic_cast<SeqEntry*>(currentEntry) )
+ {
+ return entry;
+ }
+ gdcmVerboseMacro( "Unfound SeqEntry.");
+
+ return 0;
+}
+
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
- Date: $Date: 2005/01/18 18:03:17 $
- Version: $Revision: 1.33 $
+ Date: $Date: 2005/01/20 11:37:37 $
+ Version: $Revision: 1.34 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DocEntry *GetFirstEntry();
DocEntry *GetNextEntry();
+ DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
+ ValEntry *GetValEntry(uint16_t group, uint16_t elem);
+ BinEntry *GetBinEntry(uint16_t group, uint16_t elem);
+ SeqEntry *GetSeqEntry(uint16_t group, uint16_t elem);
+
protected:
private: