Program: gdcm
Module: $RCSfile: gdcmDict.h,v $
Language: C++
- Date: $Date: 2005/01/06 20:03:27 $
- Version: $Revision: 1.26 $
+ Date: $Date: 2005/01/07 08:46:17 $
+ Version: $Revision: 1.27 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/*
* \defgroup Dict
* \brief Dict acts a memory representation of a dicom dictionary i.e.
- * it is a container for a collection of dictionary entries. The
- * dictionary is loaded from in an ascii file.
+ * it is a container for a collection of dictionary entries.
+ * The dictionary is loaded from in an ascii file.
* There should be a single public dictionary (THE dictionary of
* the actual DICOM v3) but as many shadow dictionaries as imagers
* combined with all software versions...
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/06 20:03:27 $
- Version: $Revision: 1.161 $
+ Date: $Date: 2005/01/07 08:46:18 $
+ Version: $Revision: 1.162 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return TagHT.count(key) != 0;
}
-/**
- * \brief Searches within Header Entries (Dicom Elements) parsed with
- * the public and private dictionaries
- * for the element value of a given tag.
- * \warning Don't use any longer : use GetPubEntryByName
- * @param tagName name of the searched element.
- * @return Corresponding element value when it exists,
- * and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
- */
-std::string Document::GetEntryByName(TagName const &tagName)
-{
- DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
- if( !dictEntry )
- {
- return GDCM_UNFOUND;
- }
-
- return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
-}
-
-/**
- * \brief Searches within Header Entries (Dicom Elements) parsed with
- * the public and private dictionaries
- * for the element value representation of a given tag.
- *
- * Obtaining the VR (Value Representation) might be needed by caller
- * to convert the string typed content to caller's native type
- * (think of C++ vs Python). The VR is actually of a higher level
- * of semantics than just the native C++ type.
- * @param tagName name of the searched element.
- * @return Corresponding element value representation when it exists,
- * and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
- */
-std::string Document::GetEntryVRByName(TagName const& tagName)
-{
- DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
- if( dictEntry == NULL)
- {
- return GDCM_UNFOUND;
- }
-
- DocEntry *elem = GetDocEntryByNumber(dictEntry->GetGroup(),
- dictEntry->GetElement());
- return elem->GetVR();
-}
/**
* \brief Searches within Header Entries (Dicom Elements) parsed with
}
return elem->GetLength();
}
-/**
- * \brief Sets the value (string) of the Header Entry (Dicom Element)
- * @param content string value of the Dicom Element
- * @param tagName name of the searched Dicom Element.
- * @return true when found
- */
-bool Document::SetEntryByName( std::string const &content,
- TagName const &tagName)
-{
- DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
- if( !dictEntry )
- {
- return false;
- }
-
- return SetEntryByNumber(content,dictEntry->GetGroup(),
- dictEntry->GetElement());
-}
/**
* \brief Accesses an existing DocEntry (i.e. a Dicom Element)
return false;
}*/
-/**
- * \brief Searches within the Header Entries for a Dicom Element of
- * a given tag.
- * @param tagName name of the searched Dicom Element.
- * @return Corresponding Dicom Element when it exists, and NULL
- * otherwise.
- */
-DocEntry *Document::GetDocEntryByName(TagName const &tagName)
-{
- DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
- if( !dictEntry )
- {
- return NULL;
- }
-
- return GetDocEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
-}
-
/**
* \brief retrieves a Dicom Element (the first one) using (group, element)
* \warning (group, element) IS NOT an identifier inside the Dicom Header
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2005/01/06 20:03:27 $
- Version: $Revision: 1.75 $
+ Date: $Date: 2005/01/07 08:46:18 $
+ Version: $Revision: 1.76 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void WriteContent( std::ofstream *fp, FileType type );
// Content entries
- virtual bool SetEntryByName (std::string const &content,
- TagName const &tagName );
+
virtual bool SetEntryByNumber(std::string const &content,
uint16_t group, uint16_t element);
virtual bool SetEntryByNumber(uint8_t *content, int lgth,
virtual void *GetEntryBinAreaByNumber(uint16_t group, uint16_t elem);
- virtual std::string GetEntryByName (TagName const &tagName);
- virtual std::string GetEntryVRByName (TagName const &tagName);
virtual std::string GetEntryByNumber (uint16_t group, uint16_t elem);
virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
- DocEntry *GetDocEntryByName (TagName const &tagName);
ValEntry *GetValEntryByNumber(uint16_t group, uint16_t element);
BinEntry *GetBinEntryByNumber(uint16_t group, uint16_t element);
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
- Date: $Date: 2005/01/06 20:03:28 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2005/01/07 08:46:18 $
+ Version: $Revision: 1.29 $
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);
DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
- // FIXME method to write
- //DocEntry *GetDocEntryByName(std::string Name);
bool SetEntryByNumber(std::string const &val, uint16_t group,
uint16_t element);