Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / DicomGetTagDescription Method
GdPicture image identifier. The DICOM image.
The tag index. Must be a value in the range 0 ; DicomGetTagsCount() -1.
Example





In This Topic
    DicomGetTagDescription Method (GdPictureImaging)
    In This Topic
    Returns the description, as string, of a specific tag available in a DICOM image.
    Syntax
    'Declaration
     
    
    Public Function DicomGetTagDescription( _
       ByVal ImageID As Integer, _
       ByVal TagIdx As Integer _
    ) As String
    public string DicomGetTagDescription( 
       int ImageID,
       int TagIdx
    )
    public function DicomGetTagDescription( 
        ImageID: Integer;
        TagIdx: Integer
    ): String; 
    public function DicomGetTagDescription( 
       ImageID : int,
       TagIdx : int
    ) : String;
    public: string* DicomGetTagDescription( 
       int ImageID,
       int TagIdx
    ) 
    public:
    String^ DicomGetTagDescription( 
       int ImageID,
       int TagIdx
    ) 

    Parameters

    ImageID
    GdPicture image identifier. The DICOM image.
    TagIdx
    The tag index. Must be a value in the range 0 ; DicomGetTagsCount() -1.

    Return Value

    The description of the specified tag.
    Remarks
    Use the GetStat() method to determine if the method succeeded.
    Example
    Reading the tags from a dicom document.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.dcm", false);
     
        // Write in a report all the tags available within the file.
        StringBuilder report = new StringBuilder();
        int tagCount = gdpictureImaging.DicomGetTagsCount(imageID);
        for (int tagNo = 1; tagNo <= tagCount; tagNo++)
        {
            string tagDescription = gdpictureImaging.DicomGetTagDescription(imageID, tagNo);
            string tagValue = gdpictureImaging.DicomGetTagValue(imageID, tagNo);
     
            report.AppendLine(tagDescription.ToString() + " " + tagValue.ToString());
        }
        gdpictureImaging.ReleaseGdPictureImage(imageID);
     
        MessageBox.Show(report.ToString(), "Tags", MessageBoxButtons.OK, MessageBoxIcon.Information);
    }
    See Also