Leadtools.Dicom Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
Insert Method
See Also 
Leadtools.Dicom Namespace > DicomVRTable Class : Insert Method




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
Inserts a new item in the Value Representation Table.

Syntax

Visual Basic (Declaration) 
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
Visual Basic (Usage)Copy Code
Dim instance As DicomVRTable
Dim code As DicomVRType
Dim name As String
Dim length As Integer
Dim restriction As DicomVRRestriction
Dim unitSize As Integer
Dim value As DicomVR
 
value = instance.Insert(code, name, length, restriction, unitSize)
C# 
public DicomVR Insert( 
   DicomVRType code,
   string name,
   int length,
   DicomVRRestriction restriction,
   int unitSize
)
Managed Extensions for C++ 
public: DicomVR* Insert( 
   DicomVRType code,
   string* name,
   int length,
   DicomVRRestriction restriction,
   int unitSize
) 
C++/CLI 
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, null otherwise.

Example

For an example, refer to Reset.

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: length16restrictionDicomVRRestriction.StringMaximumunitSize1

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Dicom requires a Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features