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 : Sunday, August 29, 2010 7:31:32 AM(UTC)
yourfriend20030

Groups: Registered
Posts: 59


Hi leadtoolstaff!
I want to set value for one of Tag in a new DicomDataset using(DicomDataSet ds=new DicomDataSet())
I don't know how to set value such ass for DicomTag.PatientName
Please help me
Thanks a lot!
 

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 : Sunday, August 29, 2010 10:17:16 PM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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


You can use DicomDataSet.InsertElement() Method. Here's a sample code:
DicomElement element = ds.FindFirstElement(null, DicomTag.PatientName, false);
if (element == null)
{
element = ds.InsertElement(null, false, DicomTag.PatientName, DicomVRType.PN, false, 0);
}

 
#3 Posted : Tuesday, August 31, 2010 1:26:02 AM(UTC)
yourfriend20030

Groups: Registered
Posts: 59


thanks so much! I will follow your guides and send my result later :)
 
#4 Posted : Tuesday, August 31, 2010 1:29:36 AM(UTC)
yourfriend20030

Groups: Registered
Posts: 59


if i want to set value for PatientAge tag. what DicomVRType value should I use?
thanks
 
#5 Posted : Tuesday, August 31, 2010 3:09:24 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

DicomVRType.AS. Please see this help page for more information:
http://www.leadtools.com/Help/LEADTOOLS/v17/DH/DI/Leadtools.Dicom~Leadtools.Dicom.DicomVRType.html

 
#6 Posted : Tuesday, August 31, 2010 4:16:22 PM(UTC)
yourfriend20030

Groups: Registered
Posts: 59


Thanks very much
I have read your link and current I use Method dicomdataset.InsertElementAndSetValue(DicomTag.PatientAge, "20"). It run well.
thanks again and wish you all successes!
 
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.065 seconds.