A custom object that represents a DICOM dataset.
public class DicomEditableObject : System.ComponentModel.IComponent, System.ComponentModel.ICustomTypeDescriptor, System.IDisposable Public Class DicomEditableObjectImplements System.ComponentModel.IComponent, System.ComponentModel.ICustomTypeDescriptor, System.IDisposable
public ref class DicomEditableObject : public System.ComponentModel.IComponent, System.ComponentModel.ICustomTypeDescriptor, System.IDisposable This example assigns a value to the DICOM editable object.
using Leadtools.Dicom.Common.DataTypes;using Leadtools.Dicom.Common.Extensions;using Leadtools.Dicom;using Leadtools.Dicom.Common.Editing.Converters;using Leadtools.Dicom.Common.Editing;public void TestEditableObject(){DicomEditableObject dcmObject = new DicomEditableObject();DicomDataSet ds = null;string dicomFileNameIn = Path.Combine(LEAD_VARS.ImagesDir, "IMAGE2.dcm");DicomEngine.Startup();ds = new DicomDataSet();ds.Load(dicomFileNameIn, DicomDataSetLoadFlags.None);dcmObject.BeforeAddElement += new EventHandler<BeforeAddElementEventArgs>(dcmObject_BeforeAddElement);dcmObject.DataSet = ds;Console.WriteLine("Root Element Count: " + dcmObject.Elements.Count.ToString());//// At this point the object can be assigned to a property grid.//DicomEngine.Shutdown();}void dcmObject_BeforeAddElement(object sender, BeforeAddElementEventArgs e){Console.WriteLine(e.Element.Name);Console.WriteLine(e.Element.DicomElement.VR.ToString());}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
Imports Leadtools.Dicom.Common.DataTypesImports Leadtools.Dicom.Common.ExtensionsImports Leadtools.DicomImports Leadtools.Dicom.Common.Editing.ConvertersImports Leadtools.Dicom.Common.Editing<TestMethod>Public Sub TestEditableObject()Dim dcmObject As DicomEditableObject = New DicomEditableObject()Dim ds As DicomDataSet = NothingDim dicomFileNameIn As String = Path.Combine(LEAD_VARS.ImagesDir, "IMAGE2.dcm")DicomEngine.Startup()ds = New DicomDataSet()ds.Load(dicomFileNameIn, DicomDataSetLoadFlags.None)AddHandler dcmObject.BeforeAddElement, AddressOf dcmObject_BeforeAddElementdcmObject.DataSet = dsConsole.WriteLine("Root Element Count: " & dcmObject.Elements.Count.ToString())'' At this point the object can be assigned to a property grid.'DicomEngine.Shutdown()End SubPrivate Sub dcmObject_BeforeAddElement(ByVal sender As Object, ByVal e As BeforeAddElementEventArgs)Console.WriteLine(e.Element.Name)Console.WriteLine(e.Element.DicomElement.VR.ToString())End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
|
Products |
Support |
Feedback: DicomEditableObject Class - Leadtools.Dicom.Common |
Introduction |
Help Version 19.0.2017.6.23
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.