Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 16:09:27 $
- Version: $Revision: 1.60 $
+ Date: $Date: 2004/07/31 23:30:04 $
+ Version: $Revision: 1.61 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
long beg = ftell(Fp);
lgt -= beg;
- SQDepthLevel=0;
+ SQDepthLevel = 0;
long l = ParseDES( this, beg, lgt, false); // le Load sera fait a la volee
(void)l; //is l used anywhere ?
bool gdcmDocument::CloseFile()
{
int closed = fclose(Fp);
- Fp = (FILE *)0;
+ Fp = 0;
return closed;
}
*/
gdcmValEntry * gdcmDocument::ReplaceOrCreateByNumber(
- std::string value,
+ std::string const & value,
uint16_t group,
uint16_t elem )
{
* @param Elem element number of the Entry
* \return boolean
*/
-bool gdcmDocument::ReplaceIfExistByNumber(const char* value, uint16_t group,
- uint16_t elem )
+bool gdcmDocument::ReplaceIfExistByNumber(std::string const & value,
+ uint16_t group, uint16_t elem )
{
- const std::string v = value;
- SetEntryByNumber(v, group, elem);
+ SetEntryByNumber(value, group, elem);
return true;
}
*/
int gdcmDocument::CheckIfEntryExistByNumber(uint16_t group, uint16_t element )
{
- std::string key = gdcmDictEntry::TranslateToKey(group, element );
+ const std::string &key = gdcmDictEntry::TranslateToKey(group, element );
return TagHT.count(key);
}
* @return Corresponding element value when it exists,
* and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
*/
-std::string gdcmDocument::GetEntryByName(TagName tagName)
+std::string gdcmDocument::GetEntryByName(TagName const & tagName)
{
gdcmDictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( !dictEntry )
* @return Corresponding element value representation when it exists,
* and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
*/
-std::string gdcmDocument::GetEntryVRByName(TagName tagName)
+std::string gdcmDocument::GetEntryVRByName(TagName const & tagName)
{
gdcmDictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( dictEntry == NULL)
return GDCM_UNFOUND;
}
- gdcmDocEntry* elem = GetDocEntryByNumber(dictEntry->GetGroup(),
- dictEntry->GetElement());
+ gdcmDocEntry* elem = GetDocEntryByNumber(dictEntry->GetGroup(),
+ dictEntry->GetElement());
return elem->GetVR();
}
default :
std::cout << "swapCode= " << SwapCode << std::endl;
dbg.Error(" gdcmDocument::SwapLong : unset swap code");
- a=0;
+ a = 0;
}
return a;
}