Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/24 14:14:11 $
- Version: $Revision: 1.205 $
+ Date: $Date: 2005/01/24 16:10:52 $
+ Version: $Revision: 1.206 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Load 'non string' values
- std::string PhotometricInterpretation = GetEntry(0x0028,0x0004);
+ std::string PhotometricInterpretation = GetEntryValue(0x0028,0x0004);
if( PhotometricInterpretation == "PALETTE COLOR " )
{
LoadEntryBinArea(0x0028,0x1200); // gray LUT
// we switch lineNumber and columnNumber
//
std::string RecCode;
- RecCode = GetEntry(0x0008, 0x0010); // recognition code (RET)
+ RecCode = GetEntryValue(0x0008, 0x0010); // recognition code (RET)
if (RecCode == "ACRNEMA_LIBIDO_1.1" ||
RecCode == "CANRME_AILIBOD1_1." ) // for brain-damaged softwares
// with "little-endian strings"
{
Filetype = ACR_LIBIDO;
- std::string rows = GetEntry(0x0028, 0x0010);
- std::string columns = GetEntry(0x0028, 0x0011);
- SetEntry(columns, 0x0028, 0x0010);
- SetEntry(rows , 0x0028, 0x0011);
+ std::string rows = GetEntryValue(0x0028, 0x0010);
+ std::string columns = GetEntryValue(0x0028, 0x0011);
+ SetEntryValue(columns, 0x0028, 0x0010);
+ SetEntryValue(rows , 0x0028, 0x0011);
}
// ----------------- End of ACR-LibIDO kludge ------------------
}
}
// Set the binEntry value
- SetEntry(value, valEntry);
+ SetEntryValue(value, valEntry); // The std::string value
return valEntry;
}
{
tmpArea = 0;
}
- if (!SetEntry(tmpArea,lgth,binEntry))
+ if (!SetEntryBinArea(tmpArea,lgth,binEntry))
{
if (tmpArea)
{
bool Document::ReplaceIfExist(std::string const &value,
uint16_t group, uint16_t elem )
{
- SetEntry(value, group, elem);
+ SetEntryValue(value, group, elem);
return true;
}
* @param group group number of the Dicom Element to modify
* @param elem element number of the Dicom Element to modify
*/
-bool Document::SetEntry(std::string const& content,
+bool Document::SetEntryValue(std::string const& content,
uint16_t group, uint16_t elem)
{
ValEntry *entry = GetValEntry(group, elem);
gdcmVerboseMacro( "No corresponding ValEntry (try promotion first).");
return false;
}
- return SetEntry(content,entry);
+ return SetEntryValue(content,entry);
}
-
/**
* \brief Accesses an existing DocEntry (i.e. a Dicom Element)
* through it's (group, element) and modifies it's content with
* @param group group number of the Dicom Element to modify
* @param elem element number of the Dicom Element to modify
*/
-bool Document::SetEntry(uint8_t*content, int lgth,
+bool Document::SetEntryBinArea(uint8_t*content, int lgth,
uint16_t group, uint16_t elem)
{
BinEntry *entry = GetBinEntry(group, elem);
return false;
}
- return SetEntry(content,lgth,entry);
+ return SetEntryBinArea(content,lgth,entry);
}
/**
* @param content new value (string) to substitute with
* @param entry Entry to be modified
*/
-bool Document::SetEntry(std::string const &content, ValEntry *entry)
+bool Document::SetEntryValue(std::string const &content, ValEntry *entry)
{
if(entry)
{
* @param entry Entry to be modified
* @param lgth new value length
*/
-bool Document::SetEntry(uint8_t *content, int lgth, BinEntry *entry)
+bool Document::SetEntryBinArea(uint8_t *content, int lgth, BinEntry *entry)
{
if(entry)
{
std::string Document::GetTransferSyntaxName()
{
// use the TS (TS : Transfer Syntax)
- std::string transferSyntax = GetEntry(0x0002,0x0010);
+ std::string transferSyntax = GetEntryValue(0x0002,0x0010);
if ( (transferSyntax.find(GDCM_NOTLOADED) < transferSyntax.length()) )
{
bool Document::operator<(Document &document)
{
// Patient Name
- std::string s1 = GetEntry(0x0010,0x0010);
- std::string s2 = document.GetEntry(0x0010,0x0010);
+ std::string s1 = GetEntryValue(0x0010,0x0010);
+ std::string s2 = document.GetEntryValue(0x0010,0x0010);
if(s1 < s2)
{
return true;
else
{
// Patient ID
- s1 = GetEntry(0x0010,0x0020);
- s2 = document.GetEntry(0x0010,0x0020);
+ s1 = GetEntryValue(0x0010,0x0020);
+ s2 = document.GetEntryValue(0x0010,0x0020);
if ( s1 < s2 )
{
return true;
else
{
// Study Instance UID
- s1 = GetEntry(0x0020,0x000d);
- s2 = document.GetEntry(0x0020,0x000d);
+ s1 = GetEntryValue(0x0020,0x000d);
+ s2 = document.GetEntryValue(0x0020,0x000d);
if ( s1 < s2 )
{
return true;
else
{
// Serie Instance UID
- s1 = GetEntry(0x0020,0x000e);
- s2 = document.GetEntry(0x0020,0x000e);
+ s1 = GetEntryValue(0x0020,0x000e);
+ s2 = document.GetEntryValue(0x0020,0x000e);
if ( s1 < s2 )
{
return true;