Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/10/22 13:56:45 $
- Version: $Revision: 1.110 $
+ Date: $Date: 2004/10/24 03:33:40 $
+ Version: $Revision: 1.111 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief constructor
* @param filename file to be opened for parsing
*/
-Document::Document( std::string const & filename )
- : ElementSet(-1)
+Document::Document( std::string const & filename ) : ElementSet(-1)
{
SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
Filename = filename;
* \brief This default constructor doesn't parse the file. You should
* then invoke \ref Document::SetFileName and then the parsing.
*/
-Document::Document()
- :ElementSet(-1)
+Document::Document() : ElementSet(-1)
{
SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
Initialise();
std::string const & value,
uint16_t group,
uint16_t elem,
- std::string const & VR )
+ TagName const & vr )
{
ValEntry* valEntry = 0;
DocEntry* currentEntry = GetDocEntryByNumber( group, elem);
DictEntry* dictEntry = pubDict->GetDictEntryByNumber(group, elem);
if (!dictEntry)
{
- currentEntry = NewDocEntryByNumber(group, elem,VR);
+ currentEntry = NewDocEntryByNumber(group, elem, vr);
}
else
{
int lgth,
uint16_t group,
uint16_t elem,
- std::string const& VR )
+ TagName const & vr )
{
BinEntry* binEntry = 0;
DocEntry* currentEntry = GetDocEntryByNumber( group, elem);
if (!dictEntry)
{
- currentEntry = NewDocEntryByNumber(group, elem, VR);
+ currentEntry = NewDocEntryByNumber(group, elem, vr);
}
else
{
* \return pointer to the modified/created SeqEntry (NULL when creation
* failed).
*/
-SeqEntry* Document::ReplaceOrCreateByNumber(
- uint16_t group,
- uint16_t elem)
+SeqEntry* Document::ReplaceOrCreateByNumber( uint16_t group, uint16_t elem)
{
SeqEntry* b = 0;
DocEntry* a = GetDocEntryByNumber( group, elem);
* \return boolean
*/
bool Document::ReplaceIfExistByNumber(std::string const & value,
- uint16_t group, uint16_t elem )
+ uint16_t group, uint16_t elem )
{
SetEntryByNumber(value, group, elem);
* @return Corresponding element value when it exists,
* and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
*/
-std::string Document::GetEntryByName(TagName const& tagName)
+std::string Document::GetEntryByName(TagName const & tagName)
{
DictEntry* dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( !dictEntry )
}
DocEntry* elem = GetDocEntryByNumber(dictEntry->GetGroup(),
- dictEntry->GetElement());
+ dictEntry->GetElement());
return elem->GetVR();
}
* @param tagName name of the searched Dicom Element.
* @return true when found
*/
-bool Document::SetEntryByName(std::string const & content,std::string const & tagName)
+bool Document::SetEntryByName(std::string const & content,
+ TagName const & tagName)
{
DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( !dictEntry )
* @param element element number of the Dicom Element to modify
*/
bool Document::SetEntryByNumber(std::string const& content,
- uint16_t group,
- uint16_t element)
+ uint16_t group, uint16_t element)
{
int c;
int l;
* @param group group number of the Dicom Element to modify
* @param element element number of the Dicom Element to modify
*/
-bool Document::SetEntryByNumber(uint8_t*content,
- int lgth,
- uint16_t group,
- uint16_t element)
+bool Document::SetEntryByNumber(uint8_t*content, int lgth,
+ uint16_t group, uint16_t element)
{
(void)lgth; //not used
TagKey key = DictEntry::TranslateToKey(group, element);
* @return true on success, false otherwise.
*/
bool Document::SetEntryLengthByNumber(uint32_t l,
- uint16_t group,
- uint16_t element)
+ uint16_t group, uint16_t element)
{
/// \todo use map methods, instead of multimap JPR
TagKey key = DictEntry::TranslateToKey(group, element);
* @return
*/
bool Document::SetEntryBinAreaByNumber(uint8_t* area,
- uint16_t group,
- uint16_t element)
+ uint16_t group, uint16_t element)
{
DocEntry* currentEntry = GetDocEntryByNumber(group, element);
if ( !currentEntry )
* @return Corresponding Dicom Element when it exists, and NULL
* otherwise.
*/
-DocEntry* Document::GetDocEntryByName(std::string const & tagName)
+DocEntry* Document::GetDocEntryByName(TagName const & tagName)
{
DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( !dictEntry )
* @param element Element number of the searched Dicom Element
* @return
*/
-DocEntry* Document::GetDocEntryByNumber(uint16_t group,
- uint16_t element)
+DocEntry* Document::GetDocEntryByNumber(uint16_t group, uint16_t element)
{
TagKey key = DictEntry::TranslateToKey(group, element);
if ( !TagHT.count(key))
* ValEntry.
* @return When present, the corresponding ValEntry.
*/
-ValEntry* Document::GetValEntryByNumber(uint16_t group,
- uint16_t element)
+ValEntry* Document::GetValEntryByNumber(uint16_t group, uint16_t element)
{
DocEntry* currentEntry = GetDocEntryByNumber(group, element);
if ( !currentEntry )
* \brief Parses a DocEntrySet (Zero-level DocEntries or SQ Item DocEntries)
* @return length of the parsed set.
*/
-void Document::ParseDES(DocEntrySet *set,
- long offset,
- long l_max,
- bool delim_mode)
+void Document::ParseDES(DocEntrySet *set, long offset,
+ long l_max, bool delim_mode)
{
DocEntry *newDocEntry = 0;
* @return parsed length for this level
*/
void Document::ParseSQ( SeqEntry* seqEntry,
- long offset, long l_max, bool delim_mode)
+ long offset, long l_max, bool delim_mode)
{
int SQItemNumber = 0;
bool dlm_mod;
* @param foundLength fist assumption about length
*/
void Document::FixDocEntryFoundLength(DocEntry *entry,
- uint32_t foundLength)
+ uint32_t foundLength)
{
entry->SetReadLength( foundLength ); // will be updated only if a bug is found
if ( foundLength == 0xffffffff)
* @param set The structure to be traversed (recursively).
*/
void Document::BuildFlatHashTableRecurse( TagDocEntryHT& builtHT,
- DocEntrySet* set )
+ DocEntrySet* set )
{
if (ElementSet* elementSet = dynamic_cast< ElementSet* > ( set ) )
{
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/10/22 04:13:25 $
- Version: $Revision: 1.54 $
+ Date: $Date: 2004/10/24 03:33:41 $
+ Version: $Revision: 1.55 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
ValEntry* ReplaceOrCreateByNumber(std::string const & value,
uint16_t group, uint16_t elem,
- std::string const & VR ="unkn");
+ std::string const & vr = "unkn");
BinEntry* ReplaceOrCreateByNumber(uint8_t* binArea, int lgth,
uint16_t group, uint16_t elem,
- std::string const & VR="unkn");
+ std::string const & vr = "unkn");
SeqEntry* ReplaceOrCreateByNumber(uint16_t group, uint16_t elem);
bool ReplaceIfExistByNumber ( std::string const & value,
- uint16_t group,
- uint16_t elem );
+ uint16_t group, uint16_t elem );
virtual void* LoadEntryBinArea(uint16_t group, uint16_t elem);
virtual void* LoadEntryBinArea(BinEntry* entry);