DICOM Format in Windows Forms dicom (DICOM)

Essential DICOM is a 100% native .NET library that converts the standard image formats to the DICOM format (DCM). Essential DICOM is a solution for users who need to convert the ordinary image formats to the DICOM format. It requires a DICOM viewer or an equivalent viewer to view the converted DICOM image. The following are the list of image formats that are supported for conversion.

  • JPEG
  • BMP
  • PNG
  • EMF
  • TIFF
  • GIF

Properties, Methods, and Events

The following properties and methods will fall under the DICOMImage class.

Properties

Property Description Type Data Type
FileName Gets or sets the input image file location Normal String
InputStream Gets or sets the input image as a Stream. Normal System.IO.Stream
Image Gets or sets the input image Normal System.Drawing

Methods

Method Description Parameters Type Return Type
Save () Saves the converted DICOM Image to the specified file or a Stream. Save(String)Save(Stream) Normal void

Adding DICOM to an Application

The following sets of code snippets illustrate the conversion to DICOM Format.

  • c#
  • //Initializing the DICOM Image object.
    
         DICOMImage dcImage = new DICOMImage((string)this.textBox1.Tag);
    
       //Saving the DICOM image.
    
         dcImage.Save("Sample.dc");
  • vbnet
  • 'Initializing the DICOM Image object.
    
        Dim dcImage As New DICOMImage(DirectCast(Me.textBox1.Tag, String))
    
       'Saving the DICOM image.
    
       dcImage.Save("Sample.dc")