←Select platform

DicomTagToString(long,DicomTagToStringOptions) Method

Summary

An extension method for converting a DicomTag to a DICOM readable string containing the corresponding hexadecimal representation.

Syntax
C#
C++/CLI
public static string DicomTagToString( 
   this long dicomTag, 
   DicomTagToStringOptions options 
) 
public:  
   [ExtensionAttribute] 
   static String^ DicomTagToString( 
      Int64 dicomTag, 
      DicomTagToStringOptions^ options 
   ) 

Parameters

dicomTag

A long representing a DICOM tag.

options

One or more flags DicomTagToStringOptions to specify additional formatting options.

Return Value

A string containing the corresponding hexadecimal representation of the dicomTag.

Remarks

DicomTagToString(long,DicomTagToStringOptions) is used to converting a DicomTag to a DICOM readable string containing the corresponding hexadecimal representation.

The DicomTagToStringOptions are used to specify additional formatting options.

Example
C#
using Leadtools.Dicom; 
using Leadtools.Dicom.Common; 
using Leadtools.Dicom.Common.Extensions; 
using Leadtools; 
using Leadtools.Dicom.Common.Linq.BasicDirectory; 
using Leadtools.Dicom.Common.DataTypes; 
 
using Leadtools.Codecs; 
 
public void TestDicomTagToString() 
{ 
   // returns a DICOM readable string containing the hexadecimal representation 
   string result1 = DicomTag.PatientID.DicomTagToString(); 
   // result1: 0010,0020 
 
   string result2 = DicomTag.PatientID.DicomTagToString(DicomTagToStringOptions.Comma | DicomTagToStringOptions.Parenthesis); 
   // result2: (0010,0020) 
 
} 
Requirements

Target Platforms

Help Version 22.0.2023.1.30
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.Common Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.