LEADTOOLS Support
Medical
Medical SDK Questions
Please help me how to set value for DicomTag.PatientName of a DicomDataset
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, August 29, 2010 7:31:32 AM(UTC)
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!
#2
Posted
:
Sunday, August 29, 2010 10:17:16 PM(UTC)
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)
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)
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)
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)
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!
LEADTOOLS Support
Medical
Medical SDK Questions
Please help me how to set value for DicomTag.PatientName of a DicomDataset
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.