C#: Online Guide
How To: Dicom SDK
Dicom Annotation
  |  
Home ›› XDoc.Dicom ›› C# Dicom: Dicom Annotation

C# DICOM - How to Annotate DICOM File


C# Guide: Create and Add Text and Graphics Annotations on DICOM Image File




C#.NET DICOM Annotation Overview



In order to adding mature text and graphics annotating functions into C#.NET DICOM document imaging application, you may need three professional .NET document imaging libraries, which are RasterEdge.Imaging.Basic.dll, RasterEdge.Imaging.Annotation.dll and RasterEdge.Imaging.DICOM.dll. These DLL libraries enable C# developers to add more than ten annotation shapes on DICOM image file. In addition, saving annotated DICOM document to TIFF or PDF file is also supportive.


Related .net document control helps:
asp.net pdf file permission: ASP.NET PDF File Permission Control: apply, remove PDF file permission settings in C#
asp.net create pdf: ASP.NET Create PDF Document Control: create, convert PDF file from Word, Excel, Tiff file formats in C# ASP.NET
asp.net word file viewer: ASP.NET Office Word Document Viewer: view MS Office Word files online using C# in ASP.NET web applications
asp.net dnn document viewer: DNN Document Viewer Control: view, annotate, redact, convert documents in dotnetnuke ASP.NET
document annotation asp.net: ASP.NET Document Annotation Control: text comment, drawing on files online using ASP.NET component
asp.net open pdf password: ASP.NET PDF Password Edit Control: online add, remove, update PDF file open password using C#
asp.net dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET


After integrating above three .NET DLLs into your C#.NET project, you are able to draw and add these annotation objects on DICOM document: rectangle, ellipse, line, lines, freehand, freehand lines, text, rectangular hotspot, freehand hotspot, embedded image, referenced image, polygon, rubber stamp, and call out annotations. Here, we provide an online document annotation demo, please click to have a try.


C#.NET DICOM Document Imaging - Annotating Features:


Fully written in managed C#, complying with VS 2005+ and .NET Framework 2.0+


Draw and add an arbitrary number of annotation objects on DICOM image file in C#.NET


Support annotation object oriented design for every DICOM document annotation


Capable of setting annotation properties when creating an annotation object on DICOM


Annotation objects created on DICOM can be moved, resized, rotated independently in C#.NET


Support burning text and graphics annotations onto DICOM image file with a single C#.NET method


Able to save and convert the DICOM document with annotation to TIFF and PDF using C# code




C#.NET DICOM Document Imaging - Annotating Demo



Here is a C#.NET demo code for creating and adding annotation on DICOM image file. Please firstly add the indispensable DICOM document imaging DLLs into your C#.NET project and copy the following demo code to have a test.


Add necessary references references;


  RasterEdge.Imaging.Annotation.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.JPEG2000.dll


  RasterEdge.Imaging.DICOM.dll


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XDoc.TIFF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.Imaging.DICOM;


  using RasterEdge.Imaging.Annotation;


  using RasterEdge.XDoc.TIFF;




            //load a dcm document
            DCMDocument dcmDoc = new DCMDocument(@"F:\input.dcm");
            DCMPage page = (DCMPage)dcmDoc.GetPage(0);
            // create a line annotation starting at point (0.0) and ending with point(50,50). Note, only relative position of the start and end points is used
            LineAnnotation line = CreateLineAnnotation(new LinePoint(10.0f, 10.0f), new LinePoint(50.0f, 50.0f));
            //add the line annotation on the page 
            page.AddAnnotation(line);
            dcmDoc.Save(@"F:\output.dcm");



public override void AddAnnotation(AnnotationHandler annoHandler)
Parameters:
public void AddAnnotation(AnnotationHandler annoHandler, float zoomValue)
Parameters:
public override void AddImage(BaseImage image, PointF point)
Parameters:
Table-1-1