Convert a dicom tag to its string name in gdcm in C++ -
Looking at the GDCM tag, e.g. I do this in Qt based applications with GDCM: This code will only work for the public group gdcm :: tag (0x0010,0x0010) In this case how can the tag string related to the
"PatientsName" be changed?
QString duDicomDictionary :: GetTagName (Const GCDM :: Tags and Tags) {QString retVal; Const gdcm :: Global & amp; G = GDCM :: Global :: GetInstance (); Const gdcm :: Dicts and dicts = g.GetDicts (); Const gdcm :: Dict & amp; Pubdict = dicts.GetPublicDict (); Gdcm :: DictEntry ent = pubdict.GetDictEntry (tag); If (ent.GetVR ()! = Gdcm :: VR :: INVALID) {retVal = QString :: fromStdString (ent.GetName ()); } Return Rate Vals; }
QString duDicomDictionary :: getTagName (const gdcm :: PrivateTag and tags) {after QString To get access to a private group: retval; Const gdcm :: Global & amp; G = GDCM :: Global :: GetInstance (); Const gdcm :: Dicts and dicts = g.GetDicts (); Concept GDCM :: Private Dict and Privilege = Dikes Gateprovetate (); Gdcm :: DictEntry ent = privdict.GetDictEntry (tag); If (ent.GetVR ()! = Gdcm :: VR :: INVALID) {retVal = QString :: fromStdString (ent.GetName ()); } Other {ent = g_privateDict.GetDictEntry (tag); If (ent.GetVR ()! = Gdcm :: VR :: INVALID) {retVal = QString :: fromStdString (ent.GetName ()); }} Return Rate Vals; }
Comments
Post a Comment