Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, September 10, 2008 11:44:11 PM(UTC)

vmc  
vmc

Groups: Registered
Posts: 3


Version 15 and .Net

At present I am retrieving DICOM elements as so:

dataSet.FindFirstElement(null, DicomTagType.PatientName, true);

This works fine if i know the type of DicomTag im working with but.....

If I have a user inputs a tag they want to see the value of i.e is there a way to find out the DicomTagType of this value (in this case patient name).

OR is there a way to get the dicom element by giving the tag itself without knowing the tagType:

dataSet.FindFirstElement(null, , true);

- i know that would never work but its just as an illustration so that you'll know what Im asking

Thanks
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, September 10, 2008 11:46:32 PM(UTC)

vmc  
vmc

Groups: Registered
Posts: 3


OK THE ABOVE DIDNT LIKE ME PUTTING TAG VALUES IN:

Version 15 and .Net

At present I am retrieving DICOM elements as so:

dataSet.FindFirstElement(null, DicomTagType.PatientName, true);

This works fine if i know the type of DicomTag im working with but.....

If a user inputs a tag that they want to see the value of i.e 1010,1010 is there a way to find out the DicomTagType of this value (in this case patient name).

OR is there a way to get the dicom element by giving the tag itself without knowing the tagType:

dataSet.FindFirstElement(null, 1010,1010, true);

- i know that would never work but its just as an illustration so that you'll know what Im asking

Thanks
 
#3 Posted : Thursday, September 11, 2008 5:00:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

//If you have a string that contains the group number
string strGroup = "0010";
//and another string that contains the element number
string strElmnt = "0010";
//you can combine them into one number and convert it to a 32-bit value like this:
Int32 nTag = Int32.Parse(strGroup + strElmnt, System.Globalization.NumberStyles.HexNumber);
// you can then convert the value to DicomTagType by casting like this:
Leadtools.Dicom.DicomTagType tagValue = (Leadtools.Dicom.DicomTagType)nTag;
//the following line should display "PatientName"
MessageBox.Show(tagValue.ToString());

If this is not what you want, please explain it in more details.
 
#4 Posted : Tuesday, September 16, 2008 10:25:03 PM(UTC)

vmc  
vmc

Groups: Registered
Posts: 3


Thats brilliant thanks!!

A related question though, Is there a way to get a list of all supported DICOM Tags from leadtools through code. For example in the case I wantzed to populate a ComboBox with all dicom tags?

Thanks for the help
 
#5 Posted : Wednesday, September 17, 2008 4:03:09 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You can use the following functions from the DicomTagTable Class that will help you get and navigate the Data Element Tag Table:
GetFirst
GetLast
GetNext
GetPrevious
GetCount

Please see the help topic "DicomTagTable Class Members" for information about these functions. Also, you can find source code in our C# DICOM demo in the "ElementTagDlg_Load" function call that get the tags and put them in a ListView control.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.082 seconds.