Convert a dicom tag to its string name in gdcm in C++ -


Looking at the GDCM tag, e.g. gdcm :: tag (0x0010,0x0010) In this case how can the tag string related to the "PatientsName" be changed?

I do this in Qt based applications with GDCM:

  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; }   

This code will only work for the public group

  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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -