How to get information from private tag.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
buiductoan
Posts: 24
Joined: Thu, 2013-01-10, 16:40

How to get information from private tag.

#1 Post by buiductoan »

I am using DCMTK to get private tag information. I uses print(COUT) function the private tag display correctly, but I uses the below code,I don't get tagname and VR value
fileformat.getDataset()->findAndGetOFString(tag, ostring);
cout<<tagname.getTagName()<<":"<<tagname.getVR().getVRName()<<endl;
The display is Unknow Tag & Data ??
What is happend? How to get information from private tag.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to get information from private tag.

#2 Post by J. Riesmeier »

Where does "tagname" come from and what type has it?

buiductoan
Posts: 24
Joined: Thu, 2013-01-10, 16:40

Re: How to get information from private tag.

#3 Post by buiductoan »

Sorry, I copy missing. tagname is tag.
fileformat.getDataset()->findAndGetOFString(tag, ostring);
cout<<tag.getTagName()<<":"<<tag.getVR().getVRName()<<endl;

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to get information from private tag.

#4 Post by J. Riesmeier »

And how did you define the value of "tag"? I guess you omitted the private creator... See this HOWTO.

buiductoan
Posts: 24
Joined: Thu, 2013-01-10, 16:40

Re: How to get information from private tag.

#5 Post by buiductoan »

I know this topic. I added private successfully. I can use print(COUT) to display. But I want to display it by use code not use print(COUT)

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to get information from private tag.

#6 Post by J. Riesmeier »

I'm sorry but if you don't answer the questions, I will not be able to help you ...

What is the type of "tagname" and what is its value (i.e. where did you define it)?
Background of my questions is: Did you make sure that the private creator is set appropriately.

buiductoan
Posts: 24
Joined: Thu, 2013-01-10, 16:40

Re: How to get information from private tag.

#7 Post by buiductoan »

OK, To understand easily. Assume that I copy code from this http://support.dcmtk.org/wiki/dcmtk/how ... rivatedata. In the example, the author using print(OUT) to view output.And I don't want to use print function to print, I want to get private tag that is created before. Please help me? Because I cant view the value of the private Tag but I don't see private element tag name.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Majestic-12 [Bot] and 1 guest