←Select platform

Insert Method

Summary

Inserts a new item in the Value Representation Table.

Syntax
C#
VB
C++
Java
Public Function Insert( _ 
   ByVal code As DicomVRType, _ 
   ByVal name As String, _ 
   ByVal length As Integer, _ 
   ByVal restriction As DicomVRRestriction, _ 
   ByVal unitSize As Integer _ 
) As DicomVR 
public DicomVr insert(DicomVrType code, String name, int length, DicomVrRestriction restriction, int unitSize) 

Parameters

code
Code that indicates the type of value to be stored in the data element.

name
The name of the value representation. For examples of Value Representation Names, refer to the Default Value Representation Table.

length
The length of the value to be stored in the data element

restriction
Restrictions on the length.

unitSize
The size of the smallest item to be stored in the value field of the data element

Return Value

DicomVR class if the method was successful; otherwise, null.

Remarks
  • All items are inserted at the bottom of the table
  • To see the default values for the Value Representation Table, refer to the Default Value Representation Table.
  • When evaluating length, you must also consider the values in restriction. If restriction is DicomVRRestriction.BinaryFixed or DicomVRRestriction.StringFixed, then length is a fixed value. Therefore, the data stored in the value Field of a data element would have that length and length and unitSize would be equal.
  • If restriction is DicomVRRestriction.BinaryMaximum, DicomVRRestriction.StringMaximum or DicomVRRestriction.TextMaximum then length is the maximum length of data that can be stored in the Value Field of a Data Element. In this case, unitSize would contain the minimum length of data to be stored in the Value Field of a Data Element.
  • For example, in the Default Value Representation Table, value representation DicomVRType.AE has the following default values:

    length 16
    restriction DicomVRRestriction.StringMaximum
    unitSize 1

Example

For an example, refer to Reset.

Requirements

Target Platforms

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

Leadtools.Dicom Assembly